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. SSMS 17.2 (and 17.1) Mirror configuration fails because mirror database is restoring

    Attempting to configure database mirroring through the SSMS 17.2 (and 17.1) GUI between two SQL 2016 servers fails with "Database 'Test' cannot be opened. It is in the middle of a restore."

    11 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 →
  2. QDS_LOADDB Wait type blocks all queries

    After restoring a database with Query Data Store enabled, all queries will encounter the QDS_LOADDB wait while the query store is starting up. They will not finish and no data can be retrieved from the database during this time. This is on Enterprise V 13.0.4422.0.

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

    <=-=May 27 2017 7:48AM=-=>

    Thank you for taking the time to post this issue! We understand that this could be an important performance improvement.

    This happens because Query Store information is loaded in synchronous mode. In future releases, we will work on changing it to async mode. As a workaround try to apply trace flag number 7752
    Trace flags are described here (https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql)

    <=-=Nov 8 2017 10:13AM=-=>

    We have experienced the same issue. SQL logs showed ramp up in memory waits then a large spike QDS_LOADDB for 3 hours preventing any execution.
    Query Store Disabled for now.

  3. Databases not accessible by default on auto-unlocked BitLocker drive

    Take the following BitLocker set up:

    C:\ OS Drive (encrypted) - Windows and SQL Server installed here
    D:\ Database Drive (encryped + auto-unlock)

    When Windows boots, it seems that the MS SQL Server service starts before BitLocker auto-unlocks the drives. Therefore, when SSMS is started, the databases are inaccessible (labelled as Recovery Pending). Also, any attempt to access the database data in SSMS results in strange read/write error dialogs:

    -------------------------
    Msg 823, Level 24, State 2, Line 1
    The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x000000005f4000 in file 'D:\Databases\MyDb_Data.mdf'.…

    11 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 →
  4. 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.

    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 →
  5. Non-yielding Scheduler on SQL Server 2016 (SP2-CU2) (KB4340355)

    Non-yielding Scheduler on SQL Server 2016 (SP2-CU2) (KB4340355)

    On a production server, with stable workaround, we have encountered a "non-yielding scheduler" error and system got frozen for 4 minutes, time needed to generate the stack dump:

    Call stack from the minidump:
    00 ntdll!NtSignalAndWaitForSingleObject+0xa
    01 KERNELBASE!SignalObjectAndWait+0xc8
    02 sqldk!SOS_Scheduler::Switch+0x106
    03 sqldk!SOS_Scheduler::SuspendNonPreemptive+0xd3
    04 sqldk!WorkDispatcher::DequeueTask+0x59c
    05 sqldk!SOS_Scheduler::ProcessTasks+0x232
    06 sqldk!SchedulerManager::WorkerEntryPoint+0x2a1
    07 sqldk!SystemThread::RunWorker+0x8f
    08 sqldk!SystemThreadDispatcher::ProcessWorker+0x2de
    09 sqldk!SchedulerManager::ThreadEntryPoint+0x1d8
    0a kernel32!BaseThreadInitThunk+0x22
    0b ntdll!RtlUserThreadStart+0x34

    Call stack for the process not yielding:
    00 ntdll!NtGetContextThread
    01 KERNELBASE!GetThreadContext
    02 sqldk!SOS_OS::GetThreadControlRegisters
    03 sqlmin!SystemThreadTable::MoveToNextRow
    04 sqlmin!SystemThreadTable::InternalGetRow
    05 sqlmin!CQScanTVFStreamNew::GetRow
    06 sqlmin!CQScanProfileNew::GetRowImp<1>
    07 sqlmin!CQScanCountStarNew::GetRowHelper
    08 sqlmin!CQScanStreamAggregateNew::GetCalculatedRow
    09 sqlmin!CQScanProfileNew::Open
    0a sqlmin!CQScanConcatNew::GetRow
    0b sqlmin!CQScanProfileNew::GetRowImp<1>
    0c sqlmin!CQScanSortNew::BuildSortTable
    0d sqlmin!CQScanSortNew::OpenHelper …

    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 →
  6. Azure SQL can't upgrade data-tier application

    Using DacFx 17.4.1 / SSMS 17.8.1, it is not possible to deploy and then upgrade an Azure SQL Server Database as a data-tier application.

    The initial deployment works correctly, but attempting to upgrade using SSMS or sqlpackage (using /p:BlockWhenDriftDetected=true /p:RegisterDataTierApplication=True) results in the following error:

    Databases registered as a DAC database must be hosted by an instance of SQL 2005 SP4, SQL 2008 SP2, SQL 2008 R2, SQL 2012, SQL 2014 or Microsoft Azure SQL Database.
    Unable to proceed with DAC operations on the target instance because it does not support DACs. Specify another instance, or upgrade to a version…

    10 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 →
  7. SQL SERVER 2016 (SP2-CUI) BUG? MERGE and INSERT with COLUMNSTORE index creates crash dump - script supplied

    Hi

    I have managed to create a script that (on my system) reliably generates the following message

    Location: pageref.cpp:955
    Expression: IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage ()
    SPID: 59
    Process ID: 5080
    Msg 3624, Level 20, State 1, Line 45
    A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update…

    10 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. dm_db_stats_histogram missing row when column/histogram step contains NULL

    When statistics on a nullable column contain a NULL sys.dm_db_stats_histogram will not return a row for the corresponding histogram step (when RANGE_HI_KEY is a NULL). DBCC SHOW_STATISTICS returns all steps including the aforementioned missing one. Without all the histogram levels dm_db_stats_histogram is not usable.

    I can confirm this behaviour with INT and VARCHAR columns, I haven't tested other data types). I have attached the reproduction code and a screenshot. Any questions please let me know. Thank you.

    SQL Version: 14.0.3025

    10 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 →
  9. SSDT error SQL46010 on iif

    SSDT reports an error on this valid syntax:

    create procedure test
    as
    if (iif(1 = 1, 1, 0)
    )
    < 2
    select 'ok'

    Severity Code Description Project File Line Suppression State
    Error SQL46010: Incorrect syntax near ). Stored Procedures\Procs2\test.sql 4

    See https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8ec0a584-1eec-4ffb-b5b2-1df6092817e6/sql46010-incorrect-syntax-near-?forum=ssdt

    10 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 →
  10. Merge statement Delete does not update indexed view in all cases

    A merge statement that contains both an update clause and a delete clause, does not always update indexed views that refer the table.

    Specifically, if the delete clause is the one that is triggered, and the update clause does not update any of the columns that are used by the indexed view, the deleted row is not removed from the indexed view.

    The indexed view is therefore logically inconsistent; it contains rows that are no longer part of the source table. An SQL script that demonstrates the bug is included.

    I have replicated the bug both on SQL Server 2014…

    10 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 →
  11. SSRS report builder not working after applying SQL update

    I have noticed that I can no longer use the “Report Builder” functionality in SSRS (while opening it from Report manager URL) after patching SQL Server 2012 Sp4 with recent CU KB4057116.

    Window Server 2008 R2 Standard
    SQL Server 2012 SP4 (11.0.7001.0)
    Getting below error after installing KB 4057116

    https://support.microsoft.com/en-us/help/4057116

    Following errors were detected during this operation.
    * [26/02/2018 10:15:22] System.Deployment.Application.InvalidDeploymentException (HashValidation)
    - File, interop.shdocvw.dll, has a different computed hash than specified in manifest.
    - Source: System.Deployment

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

    We’ll send you updates on this idea

    under review  ·  8 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  12. SSRS Bug: Choose new target for linked report offers no reports

    Install and configure SQL Server Reporting Services 2016SP1CU7 (mine was a Migration from 2008R2SP3, but an empty one should do). Upload a 'master' Report and create a link to it. Delete the 'master' and re-upload it. The link is now orphaned as expected.

    In previous Versions, one could re-map the link to a different master without losing parameter configuration. It had problems with hidden folders, but allowed to enter a path explicitly by hand.

    2016 pops up a selector box (aggravatingly using tiles no matter how often I dell it I want lists), which allows browsing folders, but all folders…

    10 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 →
  13. Live Query Statistics only showing the first query in a batch

    In SSMS 13.0.16000.28, click Query, Include Live Query Statistics.

    Start a multi-batch query where each query takes a non-trivial amount of time, like this:

    DECLARE @DontGoToEngland TABLE (Stuffing NVARCHAR(MAX));
    INSERT INTO @DontGoToEngland
    SELECT text
    FROM sys.messages;
    INSERT INTO @DontGoToEngland
    SELECT text
    FROM sys.messages
    ORDER BY text;
    INSERT INTO @DontGoToEngland
    SELECT text
    FROM sys.messages
    ORDER BY text;

    Execute the query, and only the first query's Live Query Statistics shows up as the batch runs (in this case, the first insert.) The Live Query Statistics no longer updates after the first query finishes - until the entire batch finishes. The status bar…

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

    <=-=Dec 4 2016 5:14PM=-=>

    Just to be clear – this is different than the fixed bug 1051306, which was about only showing the current query. (Now it just only shows the first.)

    <=-=Apr 26 2017 2:29PM=-=>

    This isn’t fixed in 14.0.17099.0 (the new SQL Server Management Studio 17 that went out today.)

  14. ssdt build does support 'CREATE OR ALTER'

    'CREATE OR ALTER' in StoredProcedure .sql files in any Database project show errors in Visual Studio 2015 SSDT
    Build database, schema compare.

    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 →

    Upvotes: 23

    <=-=Aug 1 2017 1:08PM=-=>

    Would be great to get this added.

    <=-=Nov 6 2017 1:42AM=-=>

    This is supported for “non build” scripts, not sure the use case for having for “build” files

    <=-=Nov 7 2017 7:49PM=-=>

    The scenario for supporting the CREATE OR ALTER in a build .sql for a stored procedure, is as follows:

    Since the [Test, modify, fail, modify Stored Proc, modify Test -> pass] cycle is very labour intensive currently in the VS DB project with the DB SQL Test feature, I have been experimenting with how to make writing the SQL for the test in a quicker manner.

    I have written a SQL file that has [Arrange, Act, Assert] set of SQL statements, and after finished developing the final SQL ‘Assert’ statements they are then added to the DB Test file type’s formal Assertions.

    The fact that running the Build of a DB and…

  15. SSMS 17.3 excessive memory usage

    SSMS consumes large amounts of memory & CPU, even when idle. Disabling intellisense has no effect

    10 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 →
  16. Keep system sessions from entering a single-user database

    I am super hesitant to put a database into single_user mode without being in the database because system sessions (session_id <50) will get into the database and I cannot get the sessions out. I can't kill them because they are system sessions and the KILL command doesn't work.

    This comes into play when I am in the database, set the database into single_user mode, get out of the database and have a slight delay and then try to do something with the database (such as backup the log with norecovery).

    10 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 →
  17. 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 →
  18. 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

    7 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  19. SSIS 13.0.4474 does not work in SSMS after v17.2

    When trying to connect to SSIS (13.0.4474) through any version of SSMS past 17.2 we get the following error (see attached image for full error):

    Connecting to the Integration Services service on the computer X failed with the following error: "The specified service does not exist as an installed service."

    Pinal Dave blogged about this but not sure if it is something that the Microsoft SQL Server team would be able to address or why it hasn't been flagged to be fixed before?

    Pinal Dave's blog post:
    https://blog.sqlauthority.com/2017/08/26/sql-server-management-studio-ssms-unable-connect-ssis-specified-service-not-exist-installed-service/

    It would be great to have this fixed.

    9 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. Incorrect filepath with BACKUP LOG command causes sql server 2017 CU13 to crash

    supplying an incorrect filepath with BACKUP LOG command causes sql server 2017 CU13 to crash. It seems to occur if you give in an invalid path. A valid but non-existent path will give the predicted "Cannot open backup device". An invalid path (such as "D:mydbLogBackup.bak" without the slash causes the server to crash with nothing but "unexpected error" in event log details. I ran into this because my default backup location in the ssms gui is "D:" and I cannot change it to "D:\". The error is not gui dependent though because the raw scripts fail too.

    After applying the…

    9 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