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

    16 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. SQL Server 2019 scalar functions fail incorrectly if they have a CHECKSUM

    Scalar functions with CHECKSUM(*) fail on compatibility level 150, SQL Server 2019 build 15.0.4043.16.

    ALTER DATABASE CURRENT SET COMPATIBILITY_LEVEL = 140;
    GO

    CREATE OR ALTER FUNCTION dbo.Test()
    RETURNS INT AS
    BEGIN

    DECLARE @i BIGINT;
    
    SELECT TOP 1 @i = CHECKSUM(*)
    FROM master.dbo.spt_values;
    RETURN 1;

    END
    GO
    SELECT dbo.Test(); / Works fine /

    ALTER DATABASE CURRENT SET COMPATIBILITY_LEVEL = 150;
    GO

    SELECT dbo.Test();

    /* Gets error:

    Msg 1789, Level 16, State 1, Procedure Test, Line 6 [Batch Start Line 17]
    Cannot use CHECKSUM(*) in a computed column, constraint, default definition, or INSERT statement.

    */

    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 →
  3. "[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…

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

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

    16 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 →
  7. 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 →
  8. 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

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

    8 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 →
  10. Parser allows stored procedure default assignment with no =, contrary to spec

    See https://docs.microsoft.com/en-us/sql/t-sql/statements/create-procedure-transact-sql?view=sql-server-ver15

    according to it parameter defaulting is optional but requires =

    CREATE [ OR ALTER ] { PROC | PROCEDURE }

    [schema_name.] procedure_name [ ; number ]
    
    [ { @parameter [ type_schema_name. ] data_type }
    [ VARYING ] [ = default ] [ OUT | OUTPUT | [READONLY]
    ] [ ,...n ]

    specifically [ = default ]

    However, omitting = is allowed and SP gets created but would fail to execute, i.e. bug.

    This bug is easy to make and hard to catch.

    Please ensure that such construct cannot be used when SP is created/altered

    -- SP creation succeeds …

    5 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. Object reference not set to an instance of an object when I import a flat file

    The scenario is like this, I exported the data in CSV Format from the AzureStorage explorer, then imported in my local database.
    Note: The Azure storage explorer did not export anything in the file, I supose because of this it happened, but still I would expect some other error message something like: "Invalid input file: file empty" than such an exception
    I got the following exception:
    Object reference not set to an instance of an object when I import a flat file:
    at Microsoft.SqlServer.Prose.Import.BcpProcess.set_UseSimpleDataType(Boolean value)
    at Microsoft.SqlServer.Import.Wizard.PreviewPageController.OnActivate()
    at Microsoft.SqlServer.Management.TaskForms.SqlWizardPageController.OnFirstActivate()
    at Microsoft.SqlServer.Management.TaskForms.SqlWizardPageController.Microsoft.SqlServer.Management.TaskForms.ISqlWizardPageController.SetActive()
    at Microsoft.SqlServer.Management.TaskForms.ControllerPage.OnSetActive()
    at Microsoft.SqlServer.Management.SqlWizardFramework.WizardFramework.ActivatePage(NavigationItem item, NavigationDirection direction)
    at Microsoft.SqlServer.Management.SqlWizardFramework.WizardFramework.ActivatePage(Page…

    3 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 →
  12. SQL Server 2019: Seeing a lot more SCH_M locks vs same load on SQL 2017.

    Went to SQL 2019 on multiple servers and we are seeing a lot more blockings. Lock type is SCHM. We are seeing where 2 selects are involved and blocking each other with SCHM lock taken. We stayed on compatibility level of 140 due to some bugs in 150.

    waitresource="METADATA: databaseid = 61 METADATACACHE($hash = 0x2284b6b:0x0), lockPartitionId = 0"

    transactionname="CMEDCacheEntryFactory::FindOrCre"

    lockMode="Sch-M"

    2 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 →
  13. Error in SSMS 18.5 setting baselines in Vulnerability Assessment

    When running Vulnerability Assessments in SSMS 18.5, then trying to set a result as baseline, we receive the following error. This occurs on multiple machines against a SQL 2016 database. It works correctly in SSMS 17.9

    TITLE: Microsoft SQL Server Management Studio

    VA1095 - Failed to set baseline. (Microsoft.SqlServer.Management.ThreatDetection)


    ADDITIONAL INFORMATION:

    One or more errors occurred. (mscorlib)


    Could not load file or assembly 'Microsoft.Azure.Storage.Common, Version=11.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (DataSec.VA.Core.Baseline)


    BUTTONS:

    OK

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

    We’ll send you updates on this idea

    planned  ·  1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  14. msodbcsql on Linux does not work with CP932

    Latest version 17.5.2.1 of msodbcsql on Linux does not work with CP932.
    It worked with 17.4.1.1 before upgraded to 17.5.2.1

    We want to use the latest version of the driver, but Japanese charctors corruption is one of the big blokking issue to keep update.
    If this issue can't be fix, we can't upgrade anymore. It means we can't use new feature and fix, also supportability issue also happen because of old version in the future.
    That's why we really urge to have a chance to verify if the charactors also work before the relase new version.
    Here is the detail…

    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. Using SQL Azure: DateTime2 comparison on timestamp_utc for the fn_xe_telemetry_blob_target_read_file function does not seem to function corr

    Using SQL Azure: DateTime2 comparison on the [timestamputc] file for the sys.fnxetelemetryblobtargetread_file function does not seem to function correctly.

    If I query for data in the current century, nothing is returned - I only get data when I ask for data in the distant past.

    2 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. SSMS 18.6 MEF "Component threw an exception" Error

    I installed SSMS 18.6 this morning (on Windows 6.3 (Build 9600)).

    Around lunch time it threw this dialog box:

    Microsoft SQL Server Management Studio

    An exception has been encountered. This may be caused by an extension.

    You can get more information by examining the file 'C:\Users\djameson\AppData\Roaming\Microsoft\AppEnv\15.0\ActivityLog.xml'.

    OK

    in the XML file, the latest entries are:
    <entry>

    &lt;record&gt;503&lt;/record&gt;
    
    &lt;time&gt;2020/07/29 20:46:15.995&lt;/time&gt;
    &lt;type&gt;Error&lt;/type&gt;
    &lt;source&gt;Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost&lt;/source&gt;
    &lt;description&gt;A MEF Component threw an exception at runtime: System.IO.DirectoryNotFoundException: Could not find a part of the path &amp;apos;C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Extensions\extensions.configurationchanged&amp;apos;.&amp;#x000D;&amp;#x000A; at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)&amp;#x000D;&amp;#x000A; at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights,
    1 vote
    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 →

    In addition to what David said, could you also check a few things:
    1) Uninstall SSMS 18.6
    2) WIpe out AppData\Microsoft\SQL Server Management Studio (all the folder that start with 18)
    3) Wipe out LocalAppData\Microsoft\SQL Server Management Studio\18.0_IsoShell
    4) Wipe out C:\Program Files (x86)\Microsoft SQL Server Management Studio 18
    5) Reinstall
    6) Run SSMS
    7) Tell me if things improved

    Thanks,
    -Matteo

  17. 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&#39;tcp://172.16.6.52:5022&#39;,
    
    AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
    FAILOVER_MODE =
    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 →
  18. BCP always adds a row delimiter after 2022 chars and has a bug when declaring an empty row delimiter

    There are a couple of bugs in BCP that don't allow you to extract a proper formatted JSON (or XML) file. In details:


    • BCP always adds a row delimiter after 2022 chars

    • BCP uses 63.502 white spaces (0x20) as row delimiter using -c if you pass an empty row delimiter (-r). So you'll find 63.502 white space after 2022 chars and at the end of the string.

    • BCP uses 63.502 combinations of chars 0x20 and 0x00 as row delimiter using -w if you pass an empty row delimiter (-r). So you'll find 63.502 white space after 2022 chars and at…
    8 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. SSMS 18.4 left and right arrow keys don't work in criteria pane

    When focused in a box in the criteria pane, the left and right arrow keys don't work. They have worked in previous iterations and up and down arrows still work.

    11 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. In Management Studio v18.5, no Database can be selected in the "Export Data" wizard as it was in previous version

    Please check the "Task->Data Export" wizard in Mgmt Studio v18.5. The Database selection box isn't available any more. Export always go to master db in target instance!
    /BR Wolfgang

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

    We’ll send you updates on this idea

    triaged  ·  2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1 3 4 5 267 268
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base