Update: Microsoft will be moving away from UserVoice sites on a product-by-product basis throughout the 2021 calendar year. We will leverage 1st party solutions for customer feedback. Learn more here.

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 Microsoft Q&A or Stack Overflow

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Manual failover without data loss not working in SQL2019

    We have setup two Linux SQL2019 CU3 instances on Ubuntu with HA enabled and I get an error when I execute: ALTER AVAILABILITY GROUP [ag6x52] SET (ROLE = SECONDARY); to manually failover over to the secondary replica.

    The message is:
    Msg 41104, Level 16, State 5, Line 1
    Failover of the availability group to the local replica failed because the availability group resource did not come online due to a previous error.

    My AG is as follows

    Create AVAILABILITY GROUP ag6x52
    WITH (CLUSTER_TYPE = NONE )
    FOR REPLICA ON
    N'sql52' WITH (

      ENDPOINT_URL = N'tcp://172.16.6.52:5022',
    
    AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
    FAILOVER_MODE =
    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. EXCEPTION_ACCESS_VIOLATION when returning inlined UDF with UserDataAccess from stored procedure

    SQL Server version: Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)
    Script to reproduce erorr:

    USE tempdb;
    GO

    DROP TABLE IF EXISTS dbo.testtbl;
    GO
    CREATE TABLE dbo.test
    tbl(val int NOT NULL);
    GO

    INSERT INTO dbo.test_tbl(val) VALUES (0);
    GO

    CREATE OR ALTER FUNCTION dbo.test_fn(@val int)

    RETURNS INT
    
    WITH SCHEMABINDING

    AS
    BEGIN

    IF EXISTS(SELECT val FROM dbo.test_tbl) -- UserDataAccess
    
    RETURN @val;
    RETURN 1;

    END
    GO

    CREATE OR ALTER PROCEDURE dbo.test_proc(@val int)
    AS

    RETURN dbo.test_fn(@val);
    

    GO

    EXEC dbo.test_proc @val = 10;
    GO

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  3. Incorrect syntax error with CREATE EXTERNAL commands

    This applies to SQL 2019 RC1.

    First run this:
    exec sp_configure 'polybase enabled', 0
    reconfigure

    Then run this script:

    CREATE EXTERNAL DATA SOURCE MyAzureStorage

    WITH
    
    ( LOCATION = &#39;wasbs://<a rel="nofollow noreferrer" href="mailto:daily@logs.blob.core.windows.net">daily@logs.blob.core.windows.net</a>/&#39;
    , CREDENTIAL = AzureStorageCredential
    , TYPE = HADOOP
    )
    ;

    go
    CREATE EXTERNAL FILE FORMAT csvformat
    WITH (

    FORMAT_TYPE = DELIMITEDTEXT, 
    
    FORMAT_OPTIONS (
    FIELD_TERMINATOR = &#39;,&#39;
    )

    );
    go
    CREATE EXTERNAL TABLE [Avengers]
    (
            NAME nvarchar NOT NULL,
            LASTNAME nvarchar NULL,
            Email nvarchar NULL
    )
    WITH (DATA_SOURCE = PolyBaseDS)

    The output is:

    Msg 102, Level 15,…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  4. 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.

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  5. Columnstore Index incorrectly returning data from deleted column

    When dropping a column from a table with a Clustered Columnstore Index and creating a new column with the same name, SQL Server will return incorrect data as it appears to be joining on the deleted column.

    MVCE:

    create table example
    (

    id int identity(1, 1),
    
    barcode char(22),
    id2 int,
    total decimal(10,2),
    statusId tinyint

    )

    declare @i int = 0

    while @i < 10000
    begin

    insert example 
    
    select @i, null, @i, 1

    set @i = @i + 1
    end

    create clustered columnstore index cci_example on example

    create nonclustered index ix_example on example (barcode, total)

    alter table example add statusId2 tinyint

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  6. SQL 2016 Server Agent does not read Windows Credential when running a job step with Proxy

    When running an SSIS package to copy files to Azure File Storage, a Windows Credential is used with the Azure credential information to be able to authenticate. This works fine in Visual Studio, and when executing package manually through SSISDB when deployed to server - but not when executed through SQL Server Agent using a proxy. The proxy credential have the correct Windows Credentials provided using cmdkey. The package execution fails with "The file name specified in the connection was not valid". Both UNC and drive mapping variant fails.

    A similar problem here:
    https://stackoverflow.com/questions/46497728/sql-server-agent-untrusted-domain-message/46567995#46567995

    And here:
    https://stackoverflow.com/questions/52228418/ssis-package-not-picking-up-configured-windows-credential-manager-credentials

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  7. 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!SOSScheduler::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!SOSOS::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

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  8. SSRS 2016 SP2 no longer respects text/html MIMEType

    An HTML file uploaded to SSRS 2016 SP1 would be identified as mimetype text/html. From the Report Manager portal you could click the link and it would be rendered in a browser window.

    After installing 2016 sp2 the mime type for the exact same file is now application/octet-stream. When clicking the link for this file from report manager, it prompts for download instead of opening in a browser window.

    This occurs in I.E, Edge, FF and Chrome.

    The Use case is uploading an HTML file to include a link/redirect to our data dictionary website to keep our users inside of…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  9. '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…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  10. TDE - corrupt backups when using backup compression

    After restoring a valid compressed backup of a TDE database to the same, or different, SQL server, backups of the newly restored database may be corrupt.

    This is an intermittent problem. Out of dozens of restores, 0 or more of the restored databases may no longer be able to create valid backups when using backup compression.

    If a restored database is affected by this problem, all subsequent compressed backups of the restored database are also corrupt until TDE is removed and reapplied to the database.

    For me, this problem only applies to databases restored from compressed TDE backups. Compressed backups…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  11. SQLPackage.exe - Needs to be made into at least 3 cmdlets

    SQLPackage.exe - Needs to be made into at least 3 cmdlets (and possibly more; we have added ideas for additional cmdlets below). The first 3 cmdlets that need to be made into are:
    Export-SqlDatabase
    Import-SqlDatabase
    Compare-SqlDatabase

    Export-SqlDatabase
    At a minimum Export-SqlDatabase should take parameters such as -ServerInstance -Database -TargetFile -IncludeData (ExtractAllTableData).

    It would also be nice if these cmdlets would work 'smartly' from within the provider. For instance, if you were within the provider inside a database (PS SQLSERVER:\sql\localhost\default\databases\AdventureWorks> ) and wanted to run Export-SqlDatabase you should only have to supply a filename for your export; the cmdlet should infer…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 55

    <=-=Apr 5 2016 10:09AM=-=>

    first FIX DACfx then the important verbs /publish etc

    <=-=Apr 5 2016 12:30PM=-=>

    PowerShell wrappers around DacFX seems like a good idea. Some brainstormed thoughts:
    -The word “publish” is part of the DacFX lexicon. Should Import-SqlDatabase not be called Publish-SqlDatabase? And if so, shouldn’t it be called Publish-Dacpac. Strictly speaking its not the database that’s being published, its the dacpac. Regardess of this bullet point, I’ll refer to Import-SqlDatabase in the rest of this comment.
    -Similarly I think Export-SqlDatabase should be called Export-Dacpac
    -Love the idea of piping Export-SqlDatabase to Import-SqlDatabase
    -Import-SqlDatabase needs an option to only produce the change script, not execute it.
    -Compare-SqlDatabase should have the option to compare a dacpac to a dacpac
    -Generating a DriftReport feels to me like a different cmdlet rather than being an option of Compare-SqlDatabase

    <=-=Apr 6 2016 6:12AM=-=>

    I’ve created a wrapper that accomplishes Publish…

  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.

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  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

  14. Task List seems incomplete

    I did a test for Task List in SSMS according to a question in the forum:

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4a160d5f-b390-4583-bab4-eb7596729088/not-able-to-create-tasklist-in-sql-server-management-studio?forum=sqlgetstarted#f8369eb5-4ae7-4188-945d-13875649caed

    It works as expected with version 13.0.700.242 and I checked it with some older versions of SSMS, no problem there. But after some version (for instance 13.0.16000.28), Task List is incomplete. By that, I mean there's no "New Task" button around, no dropdownbox at the left of the button, no nothing.

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  15. 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.

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    8 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  16. Use More Than Density to Cost a Scan on the Inner Side of a Nested Loop with TOP

    Consider a simple query of the following form:

    SELECT o.ID
    FROM dbo.OUTER o
    WHERE NOT EXISTS
    (

    SELECT 1
    
    FROM dbo.INNER i
    WHERE o.ID = i.ID

    );

    Sometimes the query optimizer will implement the join as a left anti semi nested loop join
    with a TOP operator applied to the scan on the dbo.INNER table. The row goal introduced
    by TOP aggressively reduces the cost of the repeated scan on the dbo.INNER table.
    The density of the table is used in the calculation to reduce the cost of the scan.
    Using the density means that the query optimizer assumes that…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  17. Deprecation of sysprocesses - DMV's doesn't fully replace all columns

    According to BOL sysprocesses system view is on its way out of the product.

    The column (there may be others) dbid in sysprocesses can not be determined through the execution DMV's.

    sys.dmexecrequests only shows currently executing sessions, so if a connection is inactive but still has context within a database there is no reliable way of determining this without the use of sysprocesses.

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 122

    <=-=Feb 12 2007 11:19AM=-=>

    Hi,

    Thanks for raising this issue. We are aware of this issue and will be fixing it in future releases of SQL Server. Unfortunately, at this point the fix cannot make it in for SP2.

    Regards,
    Tomer Verona
    SQL Server Development

    <=-=Feb 12 2007 9:31PM=-=>

    So long as the functionality of sysprocesses can be fully reproduced using DMV’s before it is deprecated from the product then I don’t see a problem.

    Thanks,
    Tony.

    <=-=Nov 19 2007 1:57PM=-=>

    Hi Tony,

    Our goal is to ensure that the replacement covers all necessary functionality before deprecating a feature. In this particular instance, we missed it and we will add it in a future release of SQL Server.

    Thanks,
    -Vineet Rao

    <=-=Feb 4 2008 9:30AM=-=>

    Please let us know if this is to be included in Katmai (CTP6/7) or reopen the issue until a timeline is established.

    <=-=Jul…
  18. Integrate B2C AD with Azure SQL server

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

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  19. Keep system sessions from entering a single-user database

    I am super hesitant to put a database into singleuser mode without being in the database because system sessions (sessionid <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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  20. SSMS 18.6 Database Diagrams Crash on Edit Custom View

    To reproduce it (tested and reproduced on several Windows 10 2004 machines with all updates + Windows Server 2019 based SQL Server 2017 Enterprise and SQL Server 2019 Dev-Edition:
    * open any type of diagram, or create a new one
    * turn on custom view
    * modify custom view
    modify view to have the following sequence "Column Name", "Data Type", "Length", "Allow Nulls", Default Values", "Identity", "Identity Seed", Identity Increment", "Description"
    remove "Data Type"
    * and on all systems I had in hands, your Management Studio should silently not respond and close and restart when doing the ladder...

    I haven't…

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    started  ·  5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base