SQL Server

Microsoft SQL Server 2017 powers your entire data estate by supporting structured and unstructured data sources. It builds on previous versions of SQL Server, which have been industry leading for four years in a row and a leader in TPC-E. It scales to petabytes of data and allows customers to process big data through PolyBase using T-SQL over any data. SQL Server has also been the least vulnerable database during the last seven years. SQL Server 2017 brings data insights with business intelligence capabilities that provide analytics at a fraction of the cost on any device along with advanced analytics with support for R and Python.

More details about SQL Server are available in the SQL Server documentation.
If you have a technical issue, please open a post on the developer forums through Stack Overflow or MSDN.

Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Identical symmetric keys do not work between SQL Server 2017 and other SQL Server version

    hi everybody!

    I believe, there is a general product issue in SQL Server 2017. The problem concerns encrypting & decrypting data using the same symmetric key on different servers.
    I have an issue in SQL Server 2017 CU3 (version 14.0.3015.40). I need to create identical symmetric keys on two servers of different versions, as it is described in MS article:

    https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/create-identical-symmetric-keys-on-two-servers

    These steps work well within and between different versions of SQL Servers (2012, 2014, 2016), but not between SQL Server 2017 and any other server.
    I can create identical symmetric keys on SQL Server 2012, 2014 and 2016. So…

    30 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  12 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. SQL2012 Could not locate Statistics on secondary replica

    When querying a table thru a linked server, got the following error message.

    Msg 2767, Level 16, State 1, Procedure sp_table_statistics2_rowset, Line 105
    Could not locate statistics '_WA_Sys_00000007_47DBAE45' in the system catalogs.

    The database was a secondary replica, primary replica was fine. Ran dbcc show statistics on secondary replica, that failed to find statistics distribution. There was an entry in sys.stats on both. Drop statistics on primary, to resolve.

    29 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    14 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 48

    <=-=Jul 9 2014 11:04PM=-=>

    This is happening to us, at least 3 times a week, on different tables in the database. The drop statistics on primary works, but the processes that are meant to run on the secondary via, linked servers are failing! A real pain!

    <=-=Apr 2 2015 1:38AM=-=>

    >A real pain!
    +1

    <=-=May 4 2015 3:39AM=-=>

    Microsoft folks – Can we please have some kind of explanation on why this happens for dynamic stats and on the asynchronous node only? It has been a real pain for us to manually drop the statistic on the primary node to clean up the corrupt statistic on the asynchronous secondary node.

    <=-=May 19 2015 11:48PM=-=>

    Clearing the userstore_dbmetadata related pools on ASYNC commit resolves the issue.
    DBCC FREESYSTEMCACHE (‘dbname’)

    Or create a stored procedure to check if the instance is an ASYNC commit, then clear the cache using an…

  3. SSMS 18.1 Crashes when Opening a Database Diagram

    SSMS 18.1 crashes (and restarts) when opening a database diagram without any error message.

    I have created several diagrams from scratch thinking it might have to do with old formatting, but this does not appear to be the case.

    You can edit a diagram (adding dozens of tables) with no problem. It is the opening of the diagram that results in the crash.

    Latest bits for SSMS and SQL Server 2017 installed today.

    SQL Server Management Studio 15.0.18131.0
    Microsoft Analysis Services Client Tools 15.0.1347.0
    Microsoft Data Access Components (MDAC) 10.0.18362.1
    Microsoft MSXML 3.0 6.0
    Microsoft Internet Explorer 9.11.18362.0
    Microsoft .NET…

    27 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    10 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    planned  ·  Matteo Taveggia responded

    Thanks for the suggestion. We’ll take a look at it and prioritize accordingly.

    Thanks,
    -Matteo

  4. Update produces impossible result

    The following produces an illogical result:

    DECLARE @Target table
    (
    c1 integer PRIMARY KEY,
    c2 integer NOT NULL,
    c3 integer NOT NULL
    );

    DECLARE @Source table
    (
    c1 integer NULL,
    c2 integer NULL,
    c3 integer NULL,

    INDEX c CLUSTERED (c1)
    );

    INSERT @Target
    (c1, c2, c3)
    VALUES
    (1, 0, 0);

    INSERT @Source
    (c1, c2, c3)
    VALUES
    (1, 2, NULL),
    (1, NULL, 3),
    (1, 4, 4);

    UPDATE T
    SET T.c2 = S.c2,
    T.c3 = S.c3
    FROM @Target AS T
    JOIN @Source AS S
    ON S.c1 = T.c1;

    SELECT * FROM @Target AS T;

    Result:

    c1 c2 c3
    1 2 3

    The…

    27 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  5. Microsoft Command Line Utilities 15 for SQL Server fails to recognize pre-requisite ODBC 17

    SQLCMD docs state that Command Line Utilities 15 requires ODBC 17 (https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-2017). However, the actual Command Line Utilities 15 installer does not recognize a previously installed ODBC 17.

    Installing ODBC 13 will allow the Command Line Utilities 15 installer to complete successfully, but we end up with errors later presumably due to the Command Line Utilities 15 actually requiring OBDC 17 functionality. Installing both versions 13 and 17 seems to get around this, but obviously requires installation of both packages.

    Our server for testing this is a 64 bit Windows 2008 R2 Enterprise with SP1.

    Repro steps:
    -…

    27 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  6. Schema files have blank lines appended after schema compare

    After doing a schema compare from the DB to the project, most schema files have a blank line appended. This causes the files to be checked out of source control and then show as changes when they shouldn't

    26 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 19

    <=-=Mar 13 2015 2:44PM=-=>

    This is happening for me too; it’s been a long time issue in the SSDT. It creates noise when doing compares, merges, and checkins where these don’t pertain to the real changes of objects.

    Microsoft Visual Studio Ultimate 2013
    Version 12.0.31101.00 Update 4
    Microsoft .NET Framework
    Version 4.5.51209

    Installed Version: Ultimate

    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Microsoft Azure Websites

    NuGet Package Manager 2.8.50926.663
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    SQL Server Data Tools 12.0.50226.0
    Microsoft SQL Server Data Tools

    <=-=Apr 1 2015 10:31AM=-=>

    Thank you for submitting this feedback. We are investigating this issue and will update when we have more information.

    Steven Green
    SQL Server Data Tools team

    <=-=Feb 1 2016 11:30AM=-=>

    This is one of those issues that convinces me that nobody at MSFT

  7. SSMS: Setting for declining Intellisense not respected in SSMS 18.

    The first thing I do when I get a new install is to go do settings and change a few things to my liking. On of these things is to turn off Intellisense.

    However, this is not respected in SSMS 18, but when I open a new query window, Intellisense is still enabled. Sometimes the icon is lit in the toolbar, but it does not really seem to be active. But far too often this is. This is extremely irritating.

    24 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    8 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  8. Filtered index not used when IS NULL and key lookup with no output

    Filtered index not used when IS NULL is used. IS NOT NULL works fine, but IS NULL does a key lookup. Same as this issue but on different version of SQL Server
    https://connect.microsoft.com/SQLServer/feedback/details/454744/filtered-index-not-used-and-key-lookup-with-no-output

    24 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  9. Traceflag 460 causing truncation errors on code paths that are not followed

    This is an odd one. I have tested this on both SQL Server 2017 CU12 and CU13 (in a container and on my production boxes).

    If you have an IF/ELSE condition, and you are inserting into a table variable in the ELSE, and that INSERT would cause a truncation issue, it will throw an error, EVEN IF THE CODE IS NOT EXECUTED.

    I have attached a reprop script that creates a database called "Repro" and runs the code. When TF460 is enabled, the ELSE block with throw an error when inserting into a table variable, even though it is impossible…

    23 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  10. Fix the Problem of Converting Hijri Dates to Gregorian Dates

    Currently Microsoft tsql function called Convert() is not able to convert the Hijri date 'yyyy-02-30' to its corresponding Gregorian Date, here are the details of this issue

    https://social.msdn.microsoft.com/Forums/en-US/b86b0cf6-280d-436e-ba92-ff168794c420/error-in-converting-hijri-date-to-gregorian-date?forum=sqlnetfx&prof=required

    23 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  11. SEQUENCE gets reset on Publish from SSDT DB Project

    When you add a sequence to a database project and have it start at 1 and then deploy the project to a database, the first time it gets created correctly.
    When you get more values and the sequence next value is 100 and then publish the project again, the publish generates an ALTER SEQUENCE dbo.SequencObject RESTART WITH 1; statement and that should not happen when the sequence object already exists.

    22 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    planned  ·  5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  12. Columnstore REORGANIZE command increases modification_counter on table statistics

    Reorganizing a columnstore index can, in some cases, cause the modification_counter on the table's statistics to increase. This is unexpected because while the underlying structure of the table is being changed, the data itself isn't being modified. This can lead to issues where SQL is automatically updating statistics the next time a query is executed against the table in cases where the modification_counter increases a significant amount because of the REORGANIZE. This has been particularly problematic for our large fact table with 150+ billion rows and full scan statistics across 40+ columns.

    Attached is a reproduction script with three examples:

    21 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  13. Add setting so LEN counts trailing whitespace

    Maybe there is a historic reason why LEN('a') and LEN('a ') return the same number.

    But that's stupid.

    The internet is awash with people like me who were stunned to discover this counter intuitive quirk (Google it).

    None of the solutions to this problem are particularly elegant or efficient:
    https://stackoverflow.com/questions/2025585/len-function-not-including-trailing-spaces-in-sql-server/2025587

    I'm assuming since this has been baked in for ages, we can't change default behavior.

    So how about:
    - Add a parameter to the LEN function to count white space
    - Add an SQL Option that more generally keeps SQL Server's hands off my white space - everywhere

    21 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  14. SQL 2017: "SET FMTONLY ON" doesn't return any resultset on UDF w/ COMPATIBILITY_LEVEL=140

    Our application uses at various places the SchemaOnly attribute (see https://msdn.microsoft.com/en-us/library/system.data.commandbehavior(v=vs.110).aspx). Lately, we noticed some strange errors when the application runs against a DB on SQL Server 2017. I boiled the issue down to the attached repro script in T-SQL, that shows clearly that SQL Server doesn' return any metadata, if a table-valued function is called using SET FMTONLY ON with COMPATIBILITY_LEVEL=140. But it works as expected using COMPATIBILITY_LEVEL=130. As I didn't find any word on this breaking change in the docs, I consider this a bug.

    20 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  15. SSDT 17.x - Unable to preview SSIS OLE DB Data Source when using Oracle Connector

    I have an SSIS packages that queries an Oracle data source. When trying to preview the query in the data source configuration window, it errors out.

    Technical Details:
    Visual Studio 2015, Update 3, Version 14.0.25431.01
    SSDT 17.4 (Build 14.0.61712.050)
    Oracle Client 12.1.0
    OLE DB Connector: Oracle Provider for OLE DB
    Error Details:
    ===================================

    There was an error displaying the preview. (Microsoft Visual Studio)

    ===================================

    The system cannot find message text for message number 0x80040e51 in the message file for OraOLEDB. (OraOLEDB)

    ------------------------------
    Program Location:

    at Microsoft.DataTransformationServices.Design.UnsafeNativeMethods.ICommandWithParameters.GetParameterInfo(IntPtr& pcParams, IntPtr& prgParamInfo, IntPtr& ppNamesBuffer)
    at Microsoft.DataTransformationServices.Design.DesignUtils.GetQueryParameters(ConnectionManager connectionManager, String sqlStatement)
    at Microsoft.DataTransformationServices.Design.PipelineUtils.ShowDataPreview(String sqlStatement, QueryParameter[]…

    20 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  6 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  16. CDW from 2016 to 2017 ends with "Property HasMemoryOptimizedObjects is not available for Database"

    Hi
    I'm trying to copy a couple of databases from a SQL2016 to SQL2017 using the Copy Database Wizard.
    I'm using SQL Management Object Method in SSMS 17.3
    SSIS Proxy account is sysadmin on both instances and local admin i Windows on both servers.
    When running the job I get the error "Property HasMemoryOptimizedObjects is not available for Database '[DATABASENAME]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.
    The databases has no Memory Optimization configured.

    If I try to use detach/attache methods I can't select any of the databases witch…

    20 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    19 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  17. Query Store SELECT Performance

    Running a query against a large Query Store repository (10 GB) can be really slow if filtering on runtime stats intervals.

    It looks like an index is missing on sys.query_store_runtime_stats (runtime_stats_interval_id).

    20 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 3

    <=-=May 27 2017 6:38AM=-=>

    Thank you for taking the time to post this issue! We understand that this could be an important performance improvement.
    Performance tuning is of such scenarios is not a trivial task. Change of such feature as Query Store can speed up one scenario and lead to degradation in others. We�ll look more into this particular use case and see what we can do.

  18. SQL Server Assertion: File: <lobss.cpp>, line = 725 Failed Assertion = '0' Should never happen.

    DBCC CHECKDB reports no errors, I rebuilt the indexes just to be sure. It happens when running this query:

    WITH t1 AS
    (
    SELECT [Endpoints].[Name] AS [f1],[MatchLocations].[Location] AS [f2],ISNULL(SUM([Matches].[LastCount]), 0) AS [f3],ROW_NUMBER() OVER (ORDER BY [Endpoints].[Name] ASC) AS [f4]
    FROM MatchLocations
    INNER JOIN [Matches] ON ([MatchLocations].[Id] = [Matches].[MatchLocationId])
    INNER JOIN [Endpoints] ON ([Endpoints].[Id] = [MatchLocations].[EndpointId])
    GROUP BY [Endpoints].[Name],[MatchLocations].[Location]
    )
    SELECT [t1].[f1] AS [t1_f1],[t1].[f2] AS [t1_f2],[t1].[f3] AS [t1_f3]
    FROM t1
    WHERE ([t1].[f4] BETWEEN 1 AND 100)
    ORDER BY [t1].[f4] ASC

    When the SUM and GROUP BY are removed, it runs just fine. It happens from time to time on some databases,…

    19 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  19. sql 2017 "cube processing task" ssis adomd client error

    A SQL Server 2017 Cumulative Update (somewhere between RTM and CU5) has broken 'Cube Process Tasks' in Integration Services (SSIS). Packages that run fine on SQL 2017 RTM (containing a Cube process Task) FAIL on CU5 and also CU6 with an error related to ADOMDClientUI. The specific error reported in the SSIS log is "Process Cube:Error: Could not load file or assembly 'Microsoft.AnalysisServices.AdomdClientUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 or one of its components. The system cannot find the file specified."

    19 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  16 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  20. SSMS 17 Tools > Options > Environment > Fonts and Colors missing Display items

    In a generic SSMS 17.2 install on a Windows 7 64-bit workstation, if I open Tools > Options > Environment > Fonts and Colors, I only get 3 items in the 'Display items:' list: Plain Text, Selected Text, and Inactive Selected Text. I have no options to change anything else. In my SSMS 2016 install, I have over 200 items in the 'Display items:' pick list. Comparison screenshot here: https://imgur.com/a/XiGMm

    I have tried resetting all settings to default in the Import and Export Settings Wizard. No change.

    19 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    18 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Could you check if “C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\1033\Microsoft.DataWarehouse.VsIntegration.rll” is missing from your machine?

    If it is, you may try two things (either one) to alleviate the pain:
    1) Locate ssms.pkgundef (typically at “C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef”)
    Edit it and add a line line this at the bottom:
    [$RootKey$\FontAndColors\Data Warehouse Designer]
    2) Grab the missing file from a machine running the same version of SSMS (it could be a temporary VM with just that binary)

    It would be helpful if somebody could share (OneDrive or equivalent) the content of the TEMP\SSMSSetup folder (that’s the history of the SSMS setup): it may reveal useful info for us.
    Note: there may be sensitive information in those log files (machine names, path names, etc…), so use your best judgement.

    -Matteo

  • Don't see your idea?

SQL Server

Feedback and Knowledge Base