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. 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 →
  2. 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 →
  3. 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  ·  2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  4. 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 →
  5. 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 →
  6. SSMS 15.4 crashes whenever incorrect Database is input in Available Databases dropdown

    Once connecting to DB server, select database from Available Databases dropdown menu.
    Once DB is active try select another DB from the dropdown menu, menu does not load any DBs.
    Manually enter database name, if incorrect SSMS crashes and is unrecoverable, query window contents are also lost in crash.
    Was in V15.2 and 15.3.
    Please fix. We switch between DBs often in our Dev environment and this is really annoying, it doesn't happen with Oracle tools.

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

  8. 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

  9. CHECK_POLICY is a no-op with CREATE LOGIN ... PASSWORD ... HASHED

    If I try to create a login with a password that obviously doesn't meet the local password policy:

    CREATE LOGIN x WITH PASSWORD = N'y', CHECK_POLICY = ON;

    I get the error you would expect:

    Msg 15118, Level 16, State 1
    Password validation failed. The password does not meet Windows policy requirements because it is not complex enough.

    However, if I create a login with that simple password and bypass the policy check, I can easily see what the password would hash to:

    CREATE LOGIN y WITH PASSWORD = N'y', CHECKPOLICY = OFF;
    SELECT password
    hash FROM sys.sql_logins WHERE…

    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 →
  10. Silent truncation on Agent Job Description

    In SSMS, for any SQL Agent job, on the Job Properties screen, the UI allows for entry of 32767 characters into the text box. However, the underlying description field on msdb.dbo.sysjobs is nvarchar(512).

    On closing the Job Properties window, SSMS silently truncates the description text to 512 characters without warning.

    Additionally, when using multi-server jobs, the job description on the MSX will be 512 characters, but the TSX will further silently truncate the job description to 255 characters.

    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 →
  11. FOR JSON output is truncated in Query to Text Output

    When I run a query in SQL Server 2016 CTP2.1, and use a FOR JSON clause, and the SSMS output is to text, and the output is wider than the maximum line size, the data gets partially truncated, not just wrapped. The resultant text is not a complete JSON document.

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

    Upvotes: 7

    <=-=Jul 2 2015 4:21AM=-=>

    Thanks, we are aware that there are problems with tooling, but for CTP3 we are focusing on programmability.
    This problem will be fixed after CTP3.

    <=-=Sep 17 2017 4:45PM=-=>

    This is still not fixed in 2016 SP1. What’s the status on this?

  12. The entity version cannot be validated. It is the target of a sync relationship

    I'm getting this error when trying to run the stored procedure mdm.udpValidateModel in MDS 2016. I have Sync relationships for some of the entities.
    Why should the stored procedure fail though?, it should simply skip entities that have been defined as "Sync"

    Msg 50000, Level 16, State 1, Procedure udpValidateEntity, Line 167
    MDSERR200226|The entity version cannot be validated. It is the target of a sync relationship., @ErrorNumber = 50000, @ErrorProcedure = "udpValidateEntity", line 34

    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 →
  13. Don't restrict JSON_VALUE and JSON_QUERY to string literals only for the path

    Restricting the new JSON functions JSONVALUE and JSONQUERY to using only string literals for the path severely restricts it's usefulness when you need to dynamically build the path. Since this is a new feature, it should be able to take any valid string, not just a string literal for the path.

    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. SSMS 17.2 query window freezing

    Writing complex queries with databases containing a large number of objects causes SSMS to hang.

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

    <=-=Aug 22 2017 11:30AM=-=>

    Probably the same underlining issue, reported here:
    https://connect.microsoft.com/SQLServer/feedback/details/3035441/ssms-2016-freezes-locks-for-minutes-when-large-sql-code-block-is-commented-out
    https://connect.microsoft.com/SQLServer/Feedback/Details/776332
    I even created a video for Microsoft to see it, how it freezes and how CPU usage is high when it freezes, providing database, code and steps to reproduce and inviting them to collaborate with me to duplicate it, if they want, but to no avail. According to Microsoft, Jason, it is all just your imagination! :)

    <=-=Aug 22 2017 11:53AM=-=>

    I have had several co-workers try to reproduce the problem, it seems that older versions do not manifest this problem. I believe this bug was introduced recently.

    <=-=Aug 22 2017 12:02PM=-=>

    I have a dozen of databases (copies of each other, dev, test and so on) and they have approx. 8500 custom objects and when large code block gets commented and certain threshold is reached, my SSMS freezes for several minutes…so frustrating, and I…

  15. Hidden parameters mess up the parameter panel in SSRS 2016

    In the 2016 version of Report Builder, parameters can be positioned within the parameter panel. As it is, this feature does not provide a single benefit, but a big downside. The parameter panels get completely messed up. One of the issues being hidden parameters, which still take up space within the parameter panel instead of not getting displayed.
    There are times where hidden cascading parameters have to be included as a workaround, because this issue is still not fixed: https://connect.microsoft.com/SQLServer/feedback/details/268032/default-does-not-get-refreshed-for-cascading-parameters#tabs
    As a result, the parameter panel of SSRS 2016 is far worse than it was in previous versions, because there…

    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. SSMS 17.1 Very Slow with Azure SQL Database

    SSMS is extremely slow for virtually all operations when connected to an Azure SQL Database. Table/Design, Store Procedure/Modify/Execute, etc. take 20-30+ seconds to open the corresponding window. It makes SSMS almost unusable. We have tried multiple computers in a variety of locations (one a gigabyte connection) with similar results. This is a critical problem that needs to be addressed as quickly as possible.

    6 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 →
  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. Query hints not allowed after or inside IF EXISTS()

    Hugo Kornelis came up with an interesting problem when combining IF EXISTS() and certain query hints (e.g. to limit parallelism or to suppress warning messages).

    Microsoft is already aware of the issue internally, but I thought it would be beneficial to post it here both for visibility of the bug itself, and to expose the workaround I came up with (and any you may come up with, also).

    Basically, the problem is this. If I want to take this query, which works fine:

    SELECT *
    
    FROM sys.objects
    WHERE [name] LIKE &#39;%foo%&#39;
    OPTION (FORCE ORDER);

    And put it inside an IF…

    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 →
  19. Slow AG metadata call still very slow in SQL Server 2019

    Following query is slow when you have large number databases, example 600, in availability groups.

    SELECT db.name as [ReplicaDBName], ag.name as [ReplicaGroup], ars.[role] as [ReplicaRole]
    FROM master.sys.availabilitygroups ag
    inner join master.sys.availabilityreplicas ar on ar.groupid = ag.groupid
    inner join master.sys.dmhadravailabilityreplicastates ars on ars.replicaid = ar.replicaid
    inner join sys.databases db on db.replicaid = ars.replicaid

    Takes anywhere from 20 seconds to over a minute and it really shouldn't since we are talking less than 1000 rows in each view.

    Also, using wizard to add database to AG is very slow to come up and it's probably due to same issue trying to pull…

    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. SQL Package on linux looks for dacpac external dacpacs with UPPCASE filenames regardless of the original

    When restoring a dacpac that references another dacpac (linked server) sqlpackage expect that the filename is DATABASE.DACPAC regardless of what the original filename was.

    Replication steps:
    Create 2 projects of type SQL Server Database projects in visual studio, use title case DatabaseOne DatabaseTwo
    Add a database reference from DatabaseOne to DatabaseTwo
    Build Grab the outputted dacpac files
    On a Linux machine / container use sqlpackage to restore the dacpac of DatabaseOne.dacpac

    Expected
    DatabaseOne and DatebaseTwo are published

    Actual
    sqlpackage fails looking for \original path\DATABASETWO.DACPAC

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

SQL Server

Categories

Feedback and Knowledge Base