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. SSMS Generate scripts

    SSMS generate scripts dialog tries to generate, but hanges forever in the latest version of SSMS 18.7.1.

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

    We’ll send you updates on this idea

    8 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. Actual plans CPUTime and ElapsedTime do not match SET STATISTICS TIME ON

    When I do a long-running query, the CPU & elapsed time from SET STATISTICS TIME ON does not match the actual execution plan.

    For example, in this live stream: https://www.youtube.com/watch?v=yJgwQP84PdE

    I ran this query from one of the large Stack Overflow databases: SELECT COUNT(*) FROM dbo.Posts;

    The actual plan: https://www.brentozar.com/pastetheplan/?id=B1KzQ42Wv

    The statistics TIME output:
    SQL Server Execution Times:
    CPU time = 55968 ms, elapsed time = 51474 ms.

    26 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. System.Data can't referenced in SQLCLR at runtime.

    SQLCLR now causes a System.Drawing.dll reference error when using System.Data.dll.

    The reason for this is that System.Data has been changed to refer to System.Drawing , but the library supported by SQL Server does not include System.Drawing.dll.

    Information on the changes can be found at https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-1147 and https://docs.microsoft.com/en-us/sql/relational-databases/clr-integration/database-objects/supported-net-framework-libraries

    A temporary workaround is to CREATE ASSEMBLY the System.Drawing.dll.
    But PERMISSION_SET = UNSAFE is required.

    The type initializer for 'Scope' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'or one of its dependencies. The system cannot find the file specified.
    System.IO.FileNotFoundException:
    at System.Data.TypeLimiter.Scope..cctor()
    System.TypeInitializationException:
    at System.Data.TypeLimiter.Scope.IsTypeUnconditionallyAllowed(Type type) …

    17 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 →
  4. SQL Server still crashes when trying to use a query that uses ODBC with table-valued parameters.

    SQL server crashes when trying to use a query that uses ODBC with table-valued parameters.

    Simple query that uses a TVP parameter - causes EXCEPTIONACCESSVIOLATION in sqlserver.exe on both SQL Server 2017/2019, RTM or latest CUs, on Windows 10 and Windows Server 2016, on physical and virtualized hardware. This is almost the same issue I had reported many years ago (~July 2015) against SQL Server 2012/2014 (Microsoft support incident "[REG:115070212906012] SQL server crashes when trying to use a query that uses ODBC with table-valued parameters.").

    SELECT c.f3,0,case right(c.f6 , 1) when '/' then left(c.f6 , len( c.f6 )…

    12 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 →
  5. Error while starting sql docker container

    Getting the following log in docker logs and resulting in container shutdown while running the latest version of the container
    Unable to retrieve registry value 'NodeRole' from Windows registry key 'Software\Microsoft\Microsoft SQL Server\MSSQL\Polybase\Configuration': (null)

    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 →
  6. Error when connecting to SSAS via msmdpump.dll in SSMS 18.5

    Hi,

    We have an SSAS instance with https access configured via msmdpump.dll. In 18.4 connection works fine, but in 18.5 it gives following error:

    Cannot connect to https://myserver/OLAP/msmdpump.dll.


    ADDITIONAL INFORMATION:

    String reference not set to an instance of a String.
    Parameter name: s (mscorlib)


    Could you check what is the reason?

    25 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 →
  7. Incorrect grouping of varbinary columns on sys.dm_exec_query_stats table

    When there are multiple plan_handle values for the same sql_handle, plan_generation_num, statement_start_offset and statement_end_offset combination, execution of below query squashes these rows under a single plan_handle, which is picked up randomly each time.

    Query on sys.dm_exec_query_stats:
    SELECT sql_handle, statement_start_offset, statement_end_offset, plan_generation_num, plan_handle,
    SUM(execution_count) sum_execution_count,
    SUM(total_logical_writes) sum_total_logical_writes,
    SUM(total_physical_reads) sum_total_physical_reads, SUM(total_logical_reads) sum_total_logical_reads,
    SUM(total_rows) sum_total_rows
    FROM master.sys.dm_exec_query_stats WITH (NOLOCK)
    GROUP BY sql_handle, statement_start_offset, statement_end_offset, plan_generation_num, plan_handle

    8 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 →
  8. Power BI Report Server (Oct 2020) changes "changed by" date before modification

    Given a Power BI dashboard on Power BI Report Server with a direct query connection to an analysis service cube. Each invokement of manage in the browser leads to a change in the "changed by" date just before any modification takes place.
    This does not happen with import queries.

    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 →
  9. (SQL Server 2019) Session crashes for stored procedures using external temp tables

    When using stored procedures that access a temporary table created outside of the stored procedure I sometimes get a session crash with:
    'Exception 0xc0000005 EXCEPTIONACCESSVIOLATION reading address 0000000000000008 at 0x00007FF884E9E1B3'

    I managed to narrow it down to the following steps to recreate the issue.

    Step 1: Create or recreate the following stored procedure

    DROP PROCEDURE if exists Bug_POC
    GO

    CREATE PROCEDURE [dbo].BugPOC AS
    CREATE INDEX IX
    TMP
    ON #TempTable (id)

    select a.Id
    from [sysobjects] as a -- Could be any table
    inner join #TempTable as t on a.id = t.Id
    GO

    Step 2: Create/Recreate a temp table…

    12 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 →
  10. Support "Azure Active Directory - Universal with MFA" in SSMS utility argument.

    SSMS utility (command line) does not support argument to specify “Authentication" option as "Azure Active Directory - Universal with MFA".

    It's already documented in public document: https://docs.microsoft.com/en-us/sql/ssms/ssms-utility?view=sql-server-ver15

    However, it's painful for us (C+AI group, Microsoft) since our org requires us to use PME account with Yubi key as MFA to request access when doing customer live-site support. Without this command line argument support, we have many extra manual steps to do before connecting to Azure SQL Server. That is time consuming and need extra efforts to educate every staff to learn that.

    It makes us harder that when switching "Authentication"…

    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 →
  11. "[DbId:XX] ADR enabled for the database." logged all the time in ErrorLog

    Hi Team,

    We were testing ADR in a two SQL Server 2019 CU 4 Developer Edition servers, with a AG setup. After enabling ADR for every database in those instances, the secondary server started to log this message "[DbId:XX] ADR enabled for the database." in the ErrorLog every few seconds for a given database if there was a transaction in that database in the primary server within those seconds.

    Ie. We have queries constantly reaching db ids 14 and 40, so we see that message constantly in the secondary for those db ids. For the dbid 16, I just created…

    13 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 →
  12. 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…

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

    We’ll send you updates on this idea

    started  ·  4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  13. SQL2017 AlwaysOn Secondary database takes long time to synchronize after failover

    We have 2 nodes in a Synchronous Availability Group setup. Whenever we perform a Manual Failover, we have to wait several minutes (up to 45) for some databases on the new secondary replica role to recover and start synchronizing again. We can see that from the SQL Error and extended event logs, that the recovery process starts and once seeing the message for Redo Phase Starting/Parallel redo is started for database 'big_DB', then there is typically this very long wait until any further messages are logged regarding the status of recovery. We have been observing these SQL Instances closely in…

    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. bug - string_agg on external table results in "An error occurred while executing GlobalQuery operation: 100001;"

    string_agg on external table results in "An error occurred while executing GlobalQuery operation: 100001;Failed to generate query plan."

    declare @colList varchar(max) = ''
    select @colList=stringagg(quotename(colname), ',
    ') from dbo.external
    table --external table

    on "Microsoft SQL Azure (RTM) - 12.0.2000.8 May 15 2020 00:47:08 Copyright (C) 2019 Microsoft Corporation "

    16 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 →
  15. DATEADD function calculates uncorrectly

    If the MONTH end is 30, then calculation is wrong, except FEB. End of month with 30 is not taken as end of month, when its really is.

    Example, where 2 last will give wrong answer.
    SELECT DATEADD(MM, 2, '31-DEC-2012') AS CALC_DATE UNION ALL
    SELECT DATEADD(MM, 7, '31-JUL-2012') UNION ALL
    SELECT DATEADD(MM, 8, '30-JUN-2012') UNION ALL
    SELECT DATEADD(MM, 1, '31-DEC-2012') UNION ALL
    SELECT DATEADD(MM, 6, '31-JUL-2012') UNION ALL
    SELECT DATEADD(MM, 7, '30-JUN-2012') UNION ALL
    SELECT DATEADD(MM, 2, '30-NOV-2012')

    3 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 →
  16. GROUPING SETS returns incorrect results

    The Query

    SELECT Surname,
    
    LEFT(Surname,1) AS SurnameInitial,
    COUNT(*) AS Count
    FROM Queen
    GROUP BY GROUPING SETS ( ( Surname ), (LEFT(Surname,1)) )

    Does NOT return the same results as the expanded version

    SELECT Surname,
    
    NULL AS SurnameInitial,
    COUNT(*) AS Count
    FROM Queen
    GROUP BY Surname
    UNION ALL
    SELECT NULL AS Surname,
    LEFT(Surname,1) AS SurnameInitial,
    COUNT(*) AS Count
    FROM Queen
    GROUP BY LEFT(Surname,1)

    Details here https://dba.stackexchange.com/a/267196/3690

    19 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 →
  17. Table variable declaration with non-existent sequence fails silently

    A batch containing a table variable that references a non-existent sequence fails silently and the remaining statements are ignored.

    This should produce the same error as for regular tables and temporary tables.

    DECLARE @T table 
    
    (
    id integer NOT NULL UNIQUE
    DEFAULT NEXT VALUE FOR dbo.NonExistentSequence,
    col1 integer NOT NULL PRIMARY KEY
    );

    INSERT @T (col1) VALUES (1);

    SELECT * FROM @T AS T;

    SELECT GETDATE();

    Commands completed successfully.

    Related: https://feedback.azure.com/forums/908035-sql-server/suggestions/34837312-improve-error-feedback-for-table-variable-declarat

    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 →
  18. Replication Monitor no longer automatically connects to publisher in 18.5

    Since upgrading to SSMS 18.5, replication monitor no longer automatically connects to the publisher. I have to manually go into the publisher properties every time and manually connect. SQL Server 2016.

    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 →
  19. SQL Server Management Studio isn't saving passwords (18.6, Build 15.0.18338.0)

    Updated SMSS to 18.6, Build 15.0.18338.0. All my saved passwords have been wiped out and it won't save any new ones even though I check the "Save Password" box.

    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 →
  20. SSMS 18.4 SQLServer 2019 CU2 Object explorer fails for SQLAgent

    After applicting CU2 on SQLServer 2019, SSMS18.4 fails to show SQLAgent jobs via object browser.

    TITLE: Microsoft SQL Server Management Studio

    Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

    For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476


    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


    A severe error occurred on the current command. The results, if any, should be discarded. (Microsoft SQL Server, Error: 0)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=15.00.4013&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476


    BUTTONS:

    OK

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

    We’ll send you updates on this idea

    8 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1 3 4 5 275 276
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base