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.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. 18.2 Tabbing Bug Not Updating Query Window Text

    If I have multiple query tabs open at a time, switching between tabs causes a lag in actual displaying the content of the new tab.

    For example, if I have two tabs open with different queries on each tab. If I switch from one tab to another, the content doesn't appear to change in the query window, but if I highlight the text, then it'll change. This has been happening since the 18.0 GA release and I was hoping subsequent updates would fix it, but they have not. I have attached three files.

    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. 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 →
  3. 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 →
  4. 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 →
  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. SSMS 17.9.1 Activity Monitor pauses when open Processes tab

    When running SSMS 17.9.1 Activity Monitor to SQL Server with around 2100 connections listed in sys.dmexecconnections and 1700 in sysprocesses and 1600 rows in sys.dmexecsessions with an active workload the query Activity Monitor pauses and tracing SSMS using the tracing in Tools\Binn\ManagementStudio\Ssms.exe.config shows a query timeout after 30 seconds:
    <system.diagnostics>

    &lt;sources&gt; 
    
    &lt;source name=&quot;global&quot; switchName=&quot;SourceSwitch&quot; switchType=&quot;System.Diagnostics.SourceSwitch&quot; &gt;
    &lt;listeners&gt;
    &lt;add name=&quot;logFile&quot; type=&quot;Microsoft.SqlServer.Diagnostics.STrace.LogFileTraceListener, Microsoft.SqlServer.Diagnostics.STrace, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91&quot; logPath=&quot;C:\temp\logs&quot; &gt;
    &lt;/add&gt;

    Capturing the query Activity Monitor runs and running the query directly in SQL Query Analyser completes after 38 seconds:
    WITH profiled_sessions as (

       SELECT DISTINCT session_id profiled_session_id from sys.dm_exec_query_profiles
    
    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 →
  9. 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, &#39;9999-01-01&#39;) 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 →
  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. filegroup to read_only prevents dbcc checkdb from running

    My database uses a combination of partitions and file groups in a sliding window configuration. I have implemented the VLDB CheckDB pattern and found that all file groups must be in a read-write state for this to work. By placing some older file groups into a read-only state I was hoping to utilize partial backups to reduce backup times. As a workaround we are temporarily placing the file groups back into a readwrite state to allow the checks to continue - however to make sure our FG backups can be used in a restore the FG backups have to be…

    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 →
  12. 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 →
  13. 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 →
  14. 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 →
  15. 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 →
  16. 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 →
  17. 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 →
  18. 'Windows API call "RegGetValueW"' error when displaying version in SQLLocalDB Utility 2016 and newer

    When using the "v" switch for the SQLLOCALDB command-line utility, it can only display versions 2012 and 2014. Starting with SQL Server 2016, the utility can no longer display installed versions of SQL Server Express LocalDB.

    In a command prompt, if I run the following:

    C:&gt;sqllocaldb v

    It returns the following (and I have versions 2012, 2014, 2016, and 2017 installed, running on Windows 10 Home Edition):

    Microsoft SQL Server 2012 (11.0.7462.6)
    Microsoft SQL Server 2014 (12.0.5214.6)
    Windows API call "RegGetValueW" returned error code: 0.

    The SQL Server 2017 version of SQLLOCALDB.EXE is being used, as indicated by the first…

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

  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base