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. SSMS Crash when dragging table from Object explorer into new query window

    Have just installed this version v18.1 and everytime I drag a table from Object explorer into new query window SSMS crashes, I have to kill it.
    I have no add-ins installed, have rebooted since installing.

    O/s Win 10 15063.1387

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

    We’ll send you updates on this idea

    48 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. SSMS 18.0 redraw issues when switching between multiple query windows

    SSMS 18.0 redraw issues when switching between multiple query windows

    Repro:
    1. Open SSMS
    2. Open a new query window and enter and execute a command, such as:
    SELECT @@SPID;
    3. Open a second query window
    4. Using your mouse, switch back and forth between the two open query windows by clicking on their tabs.
    5. After several clicks (five to ten?), the content of the first window (query and result pane) may appear to be displayed in the second window, but you can't interact with any of the text.
    6. Switching back and forth a few more times may…

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

    We’ll send you updates on this idea

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

    Thanks everybody for providing the list. I’ve passed the info to the Visual Studio Team.

    In the meanwhile, I have 2 more requests:
    1) If you happen to have Visual Studio 2017 (version 15.9.11 or greater), could you check and see if it shows the same behavior?
    2) If you happen to have SSMS 17.9.1 on the same machine, could you check and see if it shows the same behavior?

    I’m hearing from folks here that “changing SSMS such that it disables h/w acceleration by default” is not a recommended thing to do… However, quite honestly, at this point, it may be the only option I can think about.. :-(

    -Matteo

  3. Unable to deploy SSIS packages from Visual Studio 2017 (15.8.0)

    The latest version of Visual Studio 2017 (15.8.0) appears to have introduced a bug preventing deployment of SSIS project files.

    When attempting to connect to a server the deployment wizard returns the following error:

    TITLE: SQL Server Integration Services
    ------------------------------

    Could not load file or assembly 'Microsoft.SqlServer.Management.IntegrationServicesEnum, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) (mscorlib)

    ------------------------------
    ADDITIONAL INFORMATION:

    The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) (mscorlib)

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

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

    We’ll send you updates on this idea

    under review  ·  85 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  4. Wrong Results When Selecting SQLServer2016 JOIN DATETIME2(3) with DATETIME

    I'm getting unexpected results when joining between DATETIME2(3) column to DATETIME column with PK , in SQLServer 2016.

    The details are :

    I have the following table:

    CREATE TABLE DATETIME_TEST (
    [DATETIME] DATETIME NOT NULL,
    [DATETIME2_3] DATETIME2(3));
    ALTER TABLE DATETIME_TEST ADD CONSTRAINT PK_DATETIME_TEST PRIMARY KEY ([DATETIME]);
    INSERT INTO DATETIME_TEST
    ( [DATETIME],[DATETIME2_3])
    VALUES
    ('20020202 02:02:02.000', '20020202 02:02:02.000' ),
    ('20020202 02:02:02.003', '20020202 02:02:02.003' ),
    ('20020202 02:02:02.007', '20020202 02:02:02.007' ),
    ('2019-04-28 07:23:29.447', '2019-04-28 07:23:29.447' )
    ;

    SELECT * FROM DATETIME_TEST WHERE CONVERT(DATETIME2(3), [DATETIME]) = [DATETIME2_3]
    The results :

    DATETIME DATETIME2_3
    2002-02-02 02:02:02.000 2002-02-02 02:02:02.000
    2002-02-02 02:02:02.003 2002-02-02 02:02:02.003
    2002-02-02 02:02:02.007 2002-02-02 02:02:02.007
    2019-04-28…

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  5. SSMS 18.0 GA can't be installed

    When I'm trying to install SSMS 18.0 GA, I get error: "SSMS can only be upgraded by installing the package of the matching language. Please, use the matching version of the installer, or uninstall the current version of SSMS and run SSMS setup again." And I'm not alone: https://social.technet.microsoft.com/Forums/en-US/16d0e279-6ff4-4d5f-ad0a-5039235f03b9/ssms-2018-setup-blocked?forum=sqltools

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

    We’ll send you updates on this idea

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

    I’m looking into this issue.

    In the meanwhile, could you take a look at the SSMS setup logs (%TEMP%\SSMSSetup\SSMS-Setup-ENU_20190430231104.log). I’m interested in the lines in the range 133-216. Could you share those (tip: have a look at the lines and sanitize them, if you think they may contain sensible information?

    Also, if you could share the output of:
    reg query “HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server Management Studio” /reg:32 /s

    And, finally, to unblock yourself:
    1) Make sure you don’t have any previous version (RC, Preview) of SSMS 18.0 installed (check Add/Remove programs; if you do, uninstall it)
    2) Make sure “C:\Program Files (x86)\Microsoft SQL Server Management Studio 18” does not exist (if it does, the delete it)
    3) Delete the mentioned registry key (e.g. by running from an elevated cmd prompt:
    reg DELETE “HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server Management Studio” /reg:32)
    4) Retry setup
    Please, let…

  6. 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…

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

    We’ll send you updates on this idea

    9 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

  7. 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 →
  8. sys.fn_hadr_backup_is_preferred_replica causes error 41070 in SQL Server 2017 CU15

    After installing CU15 on a SQL 2017 2-Node Always On Availability Group Cluster (Windows Server Failover Clustering Mode), sys.fn_hadr_backup_is_preferred_replica throws the following exception when run against a database that is in an availability group:

    Msg 41070 - Configuration data for the availability group with Windows Server Failover Clustering (WSFC) resource ID 'GUID' is not found in the WSFC data store. The availability group may have been dropped, or a previous CREATE AVAILABILITY GROUP or DROP AVAILABILITY GROUP operation has failed. Please use DROP AVAILABILITY GROUP command to clean up previously failed operations before retrying the current operation.

    Uninstalling CU15 (reverting…

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

    We’ll send you updates on this idea

    7 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  9. SSMS 18.0 tabs don't display proper contents

    I'm getting this CONSTANTLY on my new install of SSMS 18.0, and it's DANGEROUS. I'll open several tabs, and when I switch from one tab to another, the contents of the window don't change... I'm still looking at the old tab's contents with the new tab selected. It doesn't ALWAYS happen, but it happens at least half the time... FREQUENTLY. Further, I can close a tab, and the contents of the closed tab will still display under the new "top most" tab. This can lead to making changes to the wrong file, or being confused, and losing code. This is…

    12 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 →
  10. Self referencing scalar function nesting level exceeded when adding a select

    Bug report on Self referencing scalar functions following this question, answered by Paul White here:

    https://dba.stackexchange.com/questions/239324/self-referencing-scalar-function-nesting-level-exceeded-when-adding-a-select

    In short a self referencing scalar function's references are evaluated when it should not be, resulting in an infinite loop in certain circumstances.

    Reproducing the issue:

    CREATE FUNCTION dbo.test6(@i int)
    RETURNS INT
    AS
    BEGIN
    RETURN(
    SELECT TOP 1
    CASE
    WHEN @i = 1 THEN 1
    WHEN @i = 2 THEN 2
    WHEN @i = 3 THEN (SELECT dbo.test6(1) + dbo.test6(2))
    END
    )END;

    SELECT dbo.test6(3);

    Resulting in the error:
    Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

    Part of the answer…

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  11. Avoid False-Positive reports of SQL Injection attacks from Azure Databricks

    We are receiving false-positive reports of SQL Injection attacks based on enclosing a candidate SQL statement into a sub-query and adding a "where 1=0" clause when using Azure Databricks. These reports cannot be ignored and Administrator time is wasted in reviewing these. If the connection was correctly identified, and not simply marked as "Microsoft JDBC Driver for SQL Server" or some filtering method was available, this could be avoided.

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  12. save passwords v18

    SSMS v18.0 doesn't save password properly for each server. Save the password from one server, then attempt to connect to another server with a save password and it will fail. Using SQL authentication and version 15.0.18118.0 and migrated my settings from SSMS v17.9.1.

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

    We’ll send you updates on this idea

    3 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  13. Hybrid Buffer Pool using all conventional memory on SQL Server 2019 CTP 3.0 when trace flag 834 is enabled

    In SQL Server 2019 CTP 3:

    1. Set your max server memory so that SQL Server doesn't use all the memory on the box - in my case, I'm using a 16GB VM, and I set max memory to 10GB

    2. Enable Locked Pages in Memory and trace flag 834 (large pages)

    3. Restart the SQL Server. SQL Server uses the appropriate amount of memory, say 10GB.

    4. Enable Hybrid Buffer Pool:

    1. Enable hybrid buffer pool:

    EXEC sp_configure 'show advanced', 1;
    RECONFIGURE
    EXEC sp_configure 'hybrid', 0
    RECONFIGURE

    And restart the SQL Server. SQL Server instantly uses all of the…

    7 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 →
  14. 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 →
  15. Extended Event : "sp_cache_miss" event is not capturing data

    I have setup an extended event session for sp_cache_miss event. Somehow session is not capturing any data.

    If I setup profiler trace on the same event it works fine. Strange thing is if I keep both profiler trace and Extended Event session running at the same time, XE session captures data.

    I am stumped why XE session is not capturing data, please help.

    I have tested this against SQL2016 SP2-CU3 as well as on latest build Microsoft SQL Server 2016 (SP2-CU7-OD) (KB4508636) - 13.0.5343.1

    Here is the extended event session definition I am using.

    CREATE EVENT SESSION [CacheMisses] ON SERVER …

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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 →
  17. SQL Server 2019 CTP 2.3 / Issue with scope of set identity_insert on/off

    Hello!

    I have SQL Server 2019 CTP 2.3 installed, and I have detected a change in the behavior of:

    SET IDENTITY_INSERT tabname ON/OFF

    It appears that the scope has changed since SQL Server 2019 CTP 2.2 and SQL Server 2017:

    I am using MS ODBC 17 ...

    When executing some SQL from ODBC with SQLExecDirect() with parameters, I see in my Extended Events log that the sp_executesql stored procedure is used, and in such case, a prior SET IDENTITY_INSERT ... ON has no effect on the SQL executed inside the stored procedure.

    By no effect I mean that the next…

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

    We’ll send you updates on this idea

    5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  18. SSMS 18.0 unable to export Extended Events XEL to XEL

    SSMS 18.0 is unable to export an Extended Events XEL file to another XEL file.

    When viewing an XEL file in SSMS, using the Extended Events menu command "Export to" > "XEL file..." results in this error:

    (Error Summary)
    TITLE: Microsoft SQL Server Management Studio
    ------------------------------
    Method not found: 'Void System.Object.SerializeEvent(Microsoft.SqlServer.XEvent.Linq.IEventSerializer, Microsoft.SqlServer.XEvent.IMetadataGeneration)'. (Microsoft.SqlServer.XEvent.Linq)
    ------------------------------
    BUTTONS:
    OK
    ------------------------------

    (Error Detail)
    ===================================
    Method not found: 'Void System.Object.SerializeEvent(Microsoft.SqlServer.XEvent.Linq.IEventSerializer, Microsoft.SqlServer.XEvent.IMetadataGeneration)'. (Microsoft.SqlServer.XEvent.Linq)
    ------------------------------
    Program Location:
    at Microsoft.SqlServer.XEvent.Linq.XEventFileProvider`1.SerializeEvent(IEventSerializer serializationContext, TEvent serializableEvent)
    at Microsoft.SqlServer.XEventStorage.ComputedGridStorage.SaveData(Object param)

    I reported this same issue for a previous version of SSMS (17.?) via connect item 3136373 on 2017-06-22 and it was fixed…

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

    We’ll send you updates on this idea

    3 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  19. Slow or non-operational Query Store under legacy cardinality estimator

    In many of our customers environment Query Store is completely non-operational or very slow. No report of Top Resource Consuming Queries is generated in timely fashion, no matter what configuration options is set. Other reports with some background data behave the same. So the tool is practically useless.

    If I try any SELECT statement that is generated by Query Store run in standalone SSMS windows, result is the same - did not finish.

    I found out it's because our databases are in legacy cardinality estimation mode. When I run appropriate SELECT with OPTION (QUERYTRACEON 2312) the result appear in acceptable…

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  20. Azure VM backups are interfering with the normal SQL differential backups

    If you setup a Azure VM and later manually install SQL server on that VM, and you enable Azure VM backup, the Azure VM snapshot backup uses VSS to backup the disks in a stable state. But SQL registers that VSS backup as a "full backup" in MSDB.

    That interferes with the normal SQL backup chain, and the next DIFF's will complain that the corresponding FULL is missing due to LSN changes by the VSS SQL writer based VM snapshot backup.

    The workaround for this is simple; disable the SQL VSS writer service.

    But.... disabling the SQL VSS writer in…

    3 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 →
← Previous 1 3 4 5 251 252
  • Don't see your idea?

SQL Server

Feedback and Knowledge Base