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

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. Extended Event : "sp_cache_miss" event is not capturing data

    I have setup an extended event session for spcachemiss 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]…

    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 →
  3. 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 →
  4. Intellisense forgets casing setting after restarting SSMS

    After setting casing to lowercase (Tools, Options, Text Editor, Transact-SQL, Intellisense) SSMS correctly applies lowercase. After restarting SSMS however, intellisense reverts to the default uppercase. It is necessary to return to the Tools, Options dialog (where the Intellisense setting still displays lowercase) and then clicking OK to reimpose lowercase once more. This bug first appeared in the release to GA of SSMS 18.0 and is still present in the current release 18.1 (15.0.18131.0)

    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 →
  5. AG wizard does not run sp_control_dbmasterkey_password for databases with DMK.

    There is a bug with AG add database wizard for databases with DMK, it does not run spcontroldbmasterkey_password on replicas as expected.

    In the AG Add database wizard, if you select:
    'Full Database and Log Backup', it works as expected, and the credentials are created on the replicas.
    'Automatic Seeding' to add the database, it does not run spcontroldbmasterkey_password.

    If Automatic Seeding is selected, in the validation check "Checking password of the database master key", it says it has skipped it because: "Skipped Checking password of the database master key because you skipped initial data synchronization."

    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 →
  6. Accelerated Database Recovery - Incorrect Syntax Error

    I was recently working with some of the new features of SQL 2016 and 2019, found that a combination of two was causing me a lot of headaches. Not sure if you have come across this scenario but:

    While working with an Always Encrypted connection and to enable yourself to see the data you have to turn on one of the advanced setting in your connection by using - "Column Encryption Setting=Enabled".
    While this setting is used in your connection to a specific database, you will not be able to ALTER DATABASE to SET a setting like ACCELERATEDDATABASERECOVERY…

    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 →
  7. Query Store "Log Memory Used" metric calculation is wrong

    I used XE to capture the query being executed when viewing the "Log Memory Used (KB)" metric, and noticed it performs this calculation:

    ROUND(CONVERT(float, SUM(rs.avglogbytesused*rs.countexecutions))*1024,2) totallogbytes_used

    As you can see, it's attempting to convert bytes to kilobytes by multiplying the bytes by 1024. It should be dividing the bytes by 1024. As it stands, the values displayed in the Query Store reports are off by about a factor of a million.

    There's a repro in this Database Administrators Stack Exchange post: https://dba.stackexchange.com/questions/231682/what-is-log-memory-in-query-store-2017

    I ran an insert that generated 346,796 avglogbytesused in

    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 →
  8. Bad cardinality estimate for subquery after patches / QUERYTRACEON 4199

    We run the latest version of SQL Server 2017(14.0.3048.4).
    When running the following query, it runs fine:

      SELECT
    
    (SELECT TOP 1 ROLEDEFINITION.NAME -- Rolle for ansvarlig dommer
    FROM AKTOER
    INNER JOIN PERSON ON PERSON.ID = AKTOER.PERSON_ID
    INNER JOIN ROLEDEFINITION ON AKTOER.ANSATTROLLEDEFSNAPSHOT = ROLEDEFINITION.ID
    WHERE AKTOER.SAK_ID = S.SAK_ID AND PERSON.ORGUNIT_ID = S.DOMMER_ORG_ID
    ORDER BY COALESCE(TODATE, '9999-01-01') DESC)
    FROM SAK S
    INNER JOIN #AktuelleSaker AS AKTUELLE_SAKER ON AKTUELLE_SAKER.SAK_ID = S.SAK_ID option(recompile)

    However, If we add option(recompile, QUERYTRACEON 4199)
    it use a very wrong cardinality estimate. I included the good(no query optimizer fixes) and bad plan(query optimizer fixes).

    I have tried to run…

    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 →
  9. MDS Deployment Error 400003 "The attribute reference is not valid. The attribute was not found."

    The deployment of a model containing a business rule causes error 400003 "The attribute reference is not valid. The attribute was not found.".
    The error occurs since the installation of one of the last cumulative updates and the migration of the MDS database through the MDS configuration Manager.
    We did reproduce the behaviour on several different machines.
    Deleting and re-creating the MDS database solves the problem.
    So it seems that the database migration scripts cause this problem.

    Steps to reproduce:
    1. Create new Model
    2. Create new Entity E with Attribute A
    3. Create Business Rule with Default Value x…

    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. 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 →
  11. Registered Server modifications via SQLServer PowerShell module bug

    There is an apparent bug in version 21.1.18068 of the SQLServer PowerShell module when creating Registered Servers groups and registrations. When created at the PowerShell prompt they are not reflected in the Registered Servers window (even after refresh, or reboot). Existing groups and registrations seen in the Registered Servers window are not available at the Powershell prompt using commands such as dir or Get-ChildItem.

    The commands I use to create groups and registrations at the PoweShell prompt are similar to:

    group

    New-Item -Path "sqlserver:\SQLRegistration\Database Engine Server Group\AllServers"

    registration

    New-Item -Name $(encode-sqlname 'sqlsrv') -path "sqlserver:\SQLRegistration\Database Engine Server Group\AllServers" -ItemType Registration -Value…

    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 →
    planned  ·  Matteo Taveggia responded

    Thanks for the suggestion. We are going to take a look and get back to you.

  12. SSMS 18.0 Preview 5 - Cannot access a disposed object TaskFormDialogHost

    From Object Explorer right click on a specific index, select properties, select view connection properties, I get the following error message: Cannot read property HostDistribution. This property is not available on SQL Server 2016.

    After this error message has been displayed the Index Properties window becomes inaccessible, any time I try to open it I get this error message: Cannot access a disposed object. Object name: 'TaskFormDialogHost'. (System.Windows.Forms)

    Here are stack traces for both errors:

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

    Cannot read property HostDistribution. This property is not available on SQL Server 2016. (Microsoft.SqlServer.Smo)


    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=15.0.18068.0+((SSMS_Rel).181113-0617)&EvtID=HostDistribution&LinkId=20476


    Program Location:

    at Microsoft.SqlServer.Management.Smo.SqlPropertyMetadataProvider.PropertyNameToIDLookupWithException(String propertyName, PropertyAccessPurpose…

    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. 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 →
  14. 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 →
  15. 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 →
  16. SSMS Freezing when using Active Directory Universal with MFA Support

    We use Azure SQL and recently switched to authenticate using the Active Directory Universal with MFA Support option. Since we have started using this authentication method, SSMS freezes frequently. After a period of inactivity, SSMS becomes unresponsive until the application is restarted. SSMS locks up when switching to a query tab which has been inactive. This is happening in v17.9 (14.0.17285.0) and also v18.0 Preview 4 (15.0.18040.0) has the same issue.

    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 →
  17. 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 →
  18. 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 →
  19. 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 →
  20. 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 →
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base