SQL Server

Microsoft SQL Server 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 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.


  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. New "String or binary data would be truncated" error and TABLE variables.

    The new "String or binary data would be truncated" (SQL Server 2017 CU12, et al) does not work with TABLE variables.

    6 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 →
  2. Separate connections using filtered nonclustered columnstore index on #temp table blocks (bug)

    Two batches on two separate connections execute the same stored procedure. In the stored procedure, if you create a filtered nonclustered columnstore index on a #temp table (for batch mode), one of the batches will get blocked.

    If you remove the filter from the NCCI, there is no blocking.

    6 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 →
  3. Index selection anomalies. How syntax impact on index selection

    I have found some strange index selection anomalies in SQL Server which lead to bad performance. It seems this can be solved only in SQL Server. I already asked about it on the forum (no answer) social.technet.microsoft.com (topic “Index selection anomalies. How syntax impact on index selection”).
    You can find all information about on the forum https://social.technet.microsoft.com/Forums/en-US/7b80a564-af64-4544-8b36-6ca19bc52e68/index-selection-anomalies-how-syntax-impact-on-index-selection?forum=sqldatabaseengine

    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 →
  4. DBCC CLONEDATABASE's cloned database triggers stack dump when User-Defined Table Type containing Primary Key is referenced

    Stack dump consistently triggered when table type has primary key. If the table type does not have primary key the query returns normally.

    /*
    drop database test
    end
    go

    if dbid('testclone') is not null
    begin
    alter database testclone set offline with rollback immediate
    drop database test
    clone
    end
    go

    */

    SELECT @@version -- Microsoft SQL Server 2014 (SP2-CU12) (KB4130489) - 12.0.5589.7 (X64) Jun 9 2018 11:17:15 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

    CREATE DATABASE test;
    GO

    USE test;
    GO

    CREATE TYPE dbo.tabletype AS TABLE
    (

    id INT
    6 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 →
  5. Bug in Merge Replication snapshot agent with FILESTREAM and UNIQUE constraints

    The snapshot agent fails when running on a publication that contains a merge article with FILESTREAM columns and a UNIQUE constraint.
    The full description of the bug with repro script and workaround can be found here: https://spaghettidba.com/2018/07/03/a-bug-in-merge-replication-with-filestream-data/

    6 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 →
  6. SQL Server 2017 MERGE statement assertion error when database is in simple recovery model.

    This appears to be identical to an earlier issue with MERGE statements in SQL Server 2014 and 2016, and to feedback closed for SQL Server 2016:

    https://feedback.azure.com/forums/908035-sql-server/suggestions/32901826-sql-server-2016-merge-statement-fails-when-runni

    When running a MERGE statement against a data warehouse database in simple recovery model, we receive the following fatal error: SQL Server Assertion: File: <pageref.cpp>, line=1496 Failed Assertion = 'ISOFF (BUFMINLOGGED, mbuf->bstat) || pageModifyType != PageModifyTypeContents || GetPagePtr ()->IsTextPage ()'.

    We are running SQL Server 2017 Standard Edition with CU6 (14.0.3025.34).

    A workaround for the assertion error is to set trace flag 692 which disables fast load.

    6 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 →
  7. SSMS v17.x slow launch time

    Why does SSMS v17.x take so long to load from initial launch? From the time I click on the icon to launch it to the time it asks me to select the server to connect to is 30+ seconds. At least 20-25 seconds until the splash screen is displayed.

    6 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 →
  8. CmdExec Proxy Account for SQL Server Agent doesn't load full Profile / User Registry Hive

    I have a SQL Server agent job that has a single CmdExec step that executes a NetBackup program. This job works fine when the account running the job is a member of the sysadmin server role.  In this case the command is executed under the context of the domain account to which SSA is configured to run with.  Both the database engine and SSA are using the same domain account which is also in the local administrators group in the OS. 
    If I remove the account running the job from the sysadmin server role, I then need to setup a…

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

    We’ll send you updates on this idea

    under review  ·  3 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  9. Error taking log backups on AG secondary if no log backup is taken on primary

    When creating a new database and using automatic seeding, it is possible to have a database participating in an Availability Group when no log backup has ever been taken.

    Consider this scenario on a 2-node AG
    * Create a database on the primary node.
    * Backup database to disk.
    * Create a new AG with this DB, using automatic seeding (or add DB to an existing AG with automatic seeding)
    * Attempt to take a log backup on the secondary node.
    * Log backup will end in error:
    Msg 35294, Level 16, State 5, Line 1
    Log backup for database…

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

    We’ll send you updates on this idea

    under review  ·  2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  10. Cardinality Estimation Error With Pushed Predicate on a Lookup

    In SQL Server 2005, a filtering condition on a column retrieved from a Key Lookup is applied in an explicit Filter operator after an apply join.
    In SQL Server 2008 onward, this filter can be pushed down to the lookup during copy out, but cardinality estimates are not updated correctly.
    The post-filter cardinality estimate is applied to the inner side of the lookup join, rather than the result of the join as a whole.

    -- SQL Server 2005 AdventureWorks
    SELECT

    th.ProductID,
    
    th.TransactionID,
    th.TransactionDate

    FROM Production.TransactionHistory AS th
    WHERE

    th.ProductID = 1 
    
    AND th.TransactionDate BETWEEN &#39;20030901&#39; AND &#39;20031231&#39;;

    Estimate from index…

    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 →

    Upvotes: 76

    <=-=Oct 26 2012 11:30AM=-=>

    Thanks for the feedback, we are looking into this request

    <=-=Sep 17 2013 2:44PM=-=>

    Thank you for submitting this feedback. After carefully evaluating all of the bugs in our pipeline, we are closing bugs that we will not fix in the current or future versions of SQL Server. This is because the fix is risky to implement.
    Thanks again for reporting the product issue and continued support in improving our product.

    <=-=Dec 2 2015 2:45AM=-=>

    This is something we are investigating, and needs thorough testing. This is so we do not introduce wide-spread regressions, like in cases when we had the CE underestimate, and then we would not have had not enough memory granted, leading to spills otherwise.

    <=-=Jan 3 2017 9:52AM=-=>

    Tested and confirmed fixed in SQL Server 2016 Service Pack 1 (build 13.0.4001.0)

    <=-=Jan 3 2017 10:23AM=-=>

    Actually, no. A related item…

  11. Cannot reliably drop a database in T-SQL script

    Databases can only be dropped when not in use. BOL suggests setting the database to single user with rollback immediate prior to dropping the database. The problem with this, is that it is performed in the context of the master database and a race condition occurs. Another connection can occur between the alter to change to single user and the drop statement.

    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 →

    Upvotes: 55

    <=-=Jan 12 2014 7:29AM=-=>

    We experience this issue as described and in another common similar scenario: bringing a database out of READONLY, since another connection steals that single user connection. In any scenario where you have many clients (in our case 11 high traffic web servers) combined with single-connection-allowed, multi-step changes, a connection occuring between them is VERY common. This immediately causes failure. The worst aspect is it’s not a clean fail, you’ve gone from multi-user read-only to single-user readonly throwing errors on 10 servers and you’re often left in single user mode with and some 1 web server has that connection. In a high traffic environment that’s not a simple recovery either.

    Please allow some way to combine steps in both dropping database and read-only/read-write changes – they’re a huge pain point in an active environment currently.

    <=-=Mar 17 2016 5:39AM=-=>

    We need a T-SQL

  12. Visual Studio SQL Server Project Create Certificate

    CREATE CERTIFICATE [MyCert]

    FROM BINARY = 0x1234....

    WITH PRIVATE KEY (BINARY = 0x1234..., DECRYPTION BY PASSWORD='Pass1',ENCRYPTION BY PASSWORD='Pass2');

    I get the following Visual Studio compiler error : SQL46005: Expected EXECUTABLE but encountered BINARY instead.

    This syntax works on SQL 2012 and I have the database project targeting the correct version.

    6 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 →

    Upvotes: 3

    <=-=Dec 28 2016 7:28PM=-=>

    Thank you for submitting this feedback. We have reproduced the behavior for certificate objects that you’ve described and are now investigating the appropriate resolution. We will update this Connect item as additional information is available.

    Thanks again!
    Steven Green
    SQL Server tools team

    <=-=Feb 21 2017 12:04PM=-=>

    I have this issue as well. It makes creating a homogenous test environment amongst our development team more difficult.

    <=-=Feb 21 2017 12:09PM=-=>

    Ref: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/04dd415c-047e-421d-97fe-038328b54a9a/create-certificate-from-binary?forum=ssdt

  13. sys.dm_exec_sql_text.dbid is not always populated

    Books Online says about this column.

    "ID of database.

    For ad hoc and prepared SQL statements, the ID of the database where the statements were compiled."

    However, it seems that dbid is NULL when the text is not from a stored procedure. This bug should be fixed, as the current state makes it very difficult to answer questions like "which are the 5 most expensive queries in this database".

    Surely, it is not the documentation that is wrong, is it?

    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 →
  14. RING_BUFFER_SECURITY_ERROR - extended events

    In the extended events, this error is happens constantly. I've searched the web with no luck in determining the cause of these RINGBUFFERSECURITY_ERROR errors. It's in versions 2008 R2, 2012 and 2014. Any help in determining the cause of this would be appreciated.

    other details" Error code: 0x139F NLShimImpersonate ImpersonateSecurityContext

    you can use this query to list the errors out:

    SELECT CONVERT (varchar(30), GETDATE(), 121) as runtime,
    dateadd (ms, (a.[Record Time] - sys.msticks), GETDATE()) as [NotificationTime],
    a.* , sys.msticks AS [Current Time]
    FROM
    (SELECT
    x.value('(//Record/Error/ErrorCode)[1]', 'varchar(30)') AS [ErrorCode],
    x.value('(//Record/Error/CallingAPIName)[1]', 'varchar(255)') AS [CallingAPIName],
    x.value('(//Record/Error/APIName)[1]', 'varchar(255)') AS

    6 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: 7

    <=-=Jun 20 2016 1:47AM=-=>

    I can see similar issue on SQL Server 2014 – (12.0.2000.8) and I would be more than happy to know what’s the reason of ring buffer flooding by this event.

    <=-=Sep 22 2017 2:47AM=-=>

    I’m seeing this on SQL Server 2016 SP1 CU4

  15. SSMS 17.3 Intellisense casing for built-in functions

    Although my settings are set to lower case, built-in functions are ALWAYS converted to upper case

    6 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 →
  16. SSMS don't show normal 'tables' context menu for Temporal Tables

    When right-click in temporal tables on SSMS, the context menu for tables (with Select 1000 top lines, ...) don't show.

    6 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 →
  17. Extended Events creates dump when destination file_target_folder does not exists

    I ran into odd situation while using extended event to capture queries..
    first I set filename to Drive letters does not exists.

    filename    = N&#39;DRIVE_DOESNOT_EXISTS:\xelog\query_check.xel&#39;, 
    

    and i tried to create this session and meet the following error message #25641. which is expected.

    "
    ??? 25641, ?? 16, ?? 0, ? 32
    ??, "package0.event_file"? ?? ??? ?? ?? "filename"?(?) ???? ????. ??? 0? ?? ?? ??? ???????.
    "

    and I changed destination to following

    filename = N'DRIVEEXISTS:\FOLDERDOESNOTEXISTS\query_check.xel',

    and I created the session without any error message.
    after that I altered session to start it and I met…

    6 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 →
  18. Integrate B2C AD with Azure SQL server

    Make it possible to integrate Azure B2C with Azure SQL server for Authentication and Authorizations

    6 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 →
  19. Cannot use external editor with SQLCMD

    SQLCMD returns the error below when the ED command is run to launch an external editor. Repro steps from a Windows command prompt below:

    C:\WINDOWS\system32>sqlcmd -?
    Microsoft (R) SQL Server Command Line Tool
    Version 14.0.3026.27 NT
    Copyright (C) 2017 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>SET SQLCMDEDITOR=notepad.exe

    C:\WINDOWS\system32>sqlcmd
    1> ED
    Sqlcmd: Error: Internal error at ExecProcess (Reason: The filename, directory name, or volume label syntax is incorrect).
    2>

    5 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. Functions: return strings in else if are cut depending on other string returns

    Hello,

    after an upgrade to the newest docker version of SQL Server 19 (mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04), previously we used SQL Server 2017 (mcr.microsoft.com/mssql/server:2017-latest), a function does not return the correct value anymore.

    Here is a simple Version of the function, which can reproduce the problem:

    ALTER FUNCTION [dbo].[testFunction] (@pVar nvarchar(50)) RETURNS nvarchar(50)
    AS
    BEGIN
    IF @pVar = N'a' begin

       return(N&#39;a123456789&#39;);
    

    end ELSE IF @pVar = N'b' begin

       return(N&#39;b12&#39;);
    

    end

    return(@pVar);
    END

    If you call following function with "SELECT [dbo].testFunction" the return is "a12", but i would expect "a123456789".

    It seems that the cut is dependent on the following return value,…

    5 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 →
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base