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 18.5 Crashes when Opening a Database Diagram and Unable to open existing ones

    Since I've upgraded to 18.5 I'm unable to open existing Database Diagrams, SSMS crashes and restart with no results

    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 →
  2. SSMS 18.5 wont open. All i get is the splash screen?

    <NgenBind_OptimizeNonGac is commented out in the ssms.exe.config too.

    I get this error in the log, along with a bunch of others. I tried a repair and a uninstall and reinstall and nothing works.

    &lt;type&gt;Error&lt;/type&gt;
    
    &lt;source&gt;Extension Manager&lt;/source&gt;
    &lt;description&gt;Could not load file or assembly &amp;apos;Microsoft.ServiceHub.Client, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;apos; or one of its dependencies. The system cannot find the file specified. &lt;/description&gt;

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

    3 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. Missing Temporary Table Statistics & Incomplete Histogram

    When SQL Server is unable to create statistics on a non-indexed temporary table it can cause poor query performance when joining the affected temporary table to large user tables.

    This can be seen in query plans where a warning is given for the temporary table, "Columns with no statistics"

    While trying to recreate this scenario due to a recent Production issue, I found that SQL was unable to create statistics on a temporary table that was completely empty. In my testing I found that I can force SQL to think there aren't any statistics on an empty temporary table by…

    3 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 →
  5. openjson with varbinary (base64) - it is not Base64 encoded

    /*
    Msg 13612, Level 16, State 5
    Cannot convert a string value found in the JSON text to binary value because it is not Base64 encoded.

    instead of spaces there should be real text, but this is not so clear

    reproduced on SQL Server 2017 CU 14 (14.0.3076.1), SQL Server 2017 CU 20 (14.0.3294.2), SQL Server 2019 RTM (15.0.2000.5), SQL Server 2019 CU4 (15.0.4033.1)
    */
    select len(D)

    from openjson(concat(cast(&#39;[{&quot;C&quot;:&quot;&#39; as varchar(max)), replicate(cast(&#39; &#39; as varchar(max)), 2018), &#39;&quot;,&quot;D&quot;:&quot;hT4b9qZUkUiUPVbJN9S5HA==&quot;}]&#39;))
    
    with (
    C varchar(max) &#39;$.C&#39;,
    D varbinary(16) &#39;$.D&#39;
    );

    go
    select len(D)

    from openjson(concat(cast(&#39;[{&quot;C&quot;:&quot;&#39; as varchar(max)), replicate(cast(&#39; &#39; as varchar(max)), 2018 + 2048),
    2 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 →
  6. Microsoft SQL Server 2014: Incorrect result when selecting from nested query with UNION in CROSS APPLY

    When selecting from a nested query in an OUTER APPLY statement the nested query seems to be evaluated only once in certain circumstances.

    Test Case 1

    Evaluates nested FROM query for every row in VALUES (imho expected behaviour)

    SELECT

    v,
    
    v2

    FROM

    (VALUES (1), (2), (3), (4)) AS inner_query(v)
    
    OUTER APPLY (
    SELECT
    MAX(inner_v2) AS v2
    FROM (
    SELECT
    15 AS id,
    v AS inner_v2
    ) AS outer_query
    GROUP BY id
    ) AS outer_apply

    Result:

    | v | v2|
    |---|---|
    | 1 | 1 |
    | 2 | 2 |
    | 3 | 3 |
    | 4 | 4 | …

    7 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 →
  7. SQL Server 2019 Bug with `SELECT @local_variable` syntax used to build a string via concatenation

    We are testing our application with SQL Server 2019 so that we can formally publish that we support it. While testing, we encountered a major behavioral difference between SQL Server 2017 and SQL Server 2019 in one of our user-defined functions.

    The function takes two parameters that comprise part of a WHERE clause. Then the SELECT caluse performs the concatenation as follows:

    SELECT @Output =
    
    CASE @Output
    WHEN &#39;&#39; THEN c2.name
    ELSE @Output + &#39;; &#39; + c2.name
    END

    In SQL Server 2017, this behaves as expected and concatenates all of the c2.name values into a semicolon delimited string. However,…

    4 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 →
  8. Configuring Backup Task Errors when using Expressions

    Create a maintenance plan and add the backup task

    Configure Backup Task
    Open the properties for the Backup Task
    Find Expressions in Backup Task
    Click the button with 3 dots for the Expressions property

    This now errors with cannot load assembly Microsoft.DataTransformationServices.Design version 14.0.0.0

    If I install SSDT with the SSIS tools I still get the error in SSMS but I can do the equivalent with SSDT.

    The problem is my colleagues cant use SSDT and it's really useful to be able to do expressions to make it easier to create tasks (I backup to different locations depending on what…

    3 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. about SSMS 18.5 - changed fonts of grid results not work . i try exit the software + restart the PC after saving- didnt worked

    About SSMS 18.5 - changed fonts of grid results not work . i try exit the Software + restart the PC after saving - didn't worked.
    Barley can see the results in this font (size 7).
    Must fixed SOS.

    2 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. Update produces impossible result

    The following produces an illogical result:

    DECLARE @Target table
    (

    c1 integer PRIMARY KEY, 
    
    c2 integer NOT NULL,
    c3 integer NOT NULL

    );

    DECLARE @Source table
    (

    c1 integer NULL, 
    
    c2 integer NULL,
    c3 integer NULL,

    INDEX c CLUSTERED (c1)

    );

    INSERT @Target

    (c1, c2, c3) 
    

    VALUES

    (1, 0, 0);
    

    INSERT @Source

    (c1, c2, c3) 
    

    VALUES

    (1, 2, NULL),
    
    (1, NULL, 3),
    (1, 4, 4);

    UPDATE T
    SET T.c2 = S.c2,

    T.c3 = S.c3
    

    FROM @Target AS T
    JOIN @Source AS S

    ON S.c1 = T.c1;
    

    SELECT * FROM @Target AS T;

    Result:

    c1 c2 c3
    1 2 3

    The…

    33 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 →
  11. Slow AG metadata call still very slow in SQL Server 2019

    Following query is slow when you have large number databases, example 600, in availability groups.

    SELECT db.name as [ReplicaDBName], ag.name as [ReplicaGroup], ars.[role] as [ReplicaRole]
    FROM master.sys.availabilitygroups ag
    inner join master.sys.availabilityreplicas ar on ar.groupid = ag.groupid
    inner join master.sys.dmhadravailabilityreplicastates ars on ars.replicaid = ar.replicaid
    inner join sys.databases db on db.replicaid = ars.replicaid

    Takes anywhere from 20 seconds to over a minute and it really shouldn't since we are talking less than 1000 rows in each view.

    Also, using wizard to add database to AG is very slow to come up and it's probably due to same issue trying to pull…

    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 →
  12. bcp -G Option not working as described

    Description:

    Azure Active Directory Integrated

    For Azure Active Directory Integrated authentication, provide the -G option without a user name or password. This configuration assumes that the current Windows user account (the account the bcp command is running under) is federated with Azure AD.

    This is not working. If you don't provide a username: you get the error:

    SQLState = FA004, NativeError = 0
    Error = [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Failed to authenticate the user '' in Active Directory (Authentication option is 'ActiveDirectoryIntegrated').
    Error code 0x800401F0; state 10
    CoInitialize has not been called.

    If you provide user and password…

    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 →
  13. fatal exception c0000005

    SQL Server crash because of fatal exception c0000005.
    Service restarted without issue.

    2 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. After SQL restart, CTE causes invalid object name error for a short period in SQL Server 2019

    We have some SQL code that has been in production for some time, in a SQL Server 2016 database; but it is raising an error in a SQL Server 2019 database for the first short period after restarting SQL Server (anywhere from 5 minutes to an hour, probably depending on the level of activity in SQL Server). The error is "invalid object name" for a CTE (Common Table Expression). I can reproduce the error by just calling the function (shown further below) with no other SQL code (such as stored procedures) being called. If I restart SQL Server, the error…

    3 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 →
  15. SSMS 18.2 crash on Extended Events properties form

    Opening a "New session…." (not the wizard) of extended events (or a previously existing one) and browsing the pages (Events, Data Storage, Advanced) hangs the windows and/or directly crashes/terminates SSMS with no error message, specially on the Events page.

    Application logs shows the crash as an unhandled exception:

    Log Name: Application
    Source: Application Error
    Event ID: 1000
    Task Category: (100)
    Level: Error
    Description:
    Faulting application name: Ssms.exe, version: 2019.150.18142.0, time stamp: 0x5d3573be
    Faulting module name: System.Windows.Forms.ni.dll, version: 4.8.3752.0, time stamp: 0x5c7a2429
    Exception code: 0xc0000005
    Fault offset: 0x00c412df
    Faulting process id: 0x24a4
    Faulting application start time: 0x01d5433d9e072f9d
    Faulting application path: C:\Program…

    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 →
  16. BULK INSERT requires sysadmin on linux.

    On the linux platform,

    BULK INSERT is allowed and is currently documented as "supported".

    The only way it works currently is if the account used to execute it is sysadmin.

    neither bulkadmin role membership nor the server level permission "ADMINISTER BULK OPERATIONS" are allowed to be run on linux - they both return:

    Msg 16202, Level 15, State 1, Line 1
    Keyword or statement option 'bulkadmin' is not supported on the 'Linux' platform.

    Msg 16202, Level 15, State 3, Line 1
    Keyword or statement option 'ADMINISTER BULK OPERATIONS' is not supported on the 'Linux' platform.This

    respectively.

    Please, fix it or…

    4 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 →
  17. Improve the poor performance of the sys.dm_db_stats_properties DMV

    We have some databases with wide tables on COLUMNSTORE compression (21 or 30 COLUMNS) and 2500 partitions (by date). There are about 4000 stats objects in this database, of which most are INCREMENTAL column statistics on the partitioned tables.

    When running sys.dmdbstats_properties on these databases, the performance of this table function is extremely poor. We are experiencing approximately 1 second of actual execution time per ROW - i.e per 'run' of the this table function.

    Attached is an example of the query plan generated by a simple query with the CROSS APPLY syntax used to execute this table…

    3 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. Bug in SSMS 18.5: SQL Server agent does not provide 32 Bit execution

    In SSMS 18.5 the option to execute a SSIS package in 32 bit for a certain step does not exist anymore. Please investigate - attached screenshots show the difference between both versions.

    Best Regards
    Tobias

    2 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 →
  19. Bug in sys.identity_columns: does not honor read uncommitted, causes blocking

    There's a bug in sys.identity_columns: it ignores requests for read uncommitted. This means if someone's rebuilding a large index on an identity column, queries get blocked.

    To reproduce it, create a table with a clustered index on an identity column, and rebuild it:

    CREATE TABLE dbo.Test (Id INT IDENTITY(1,1), CONSTRAINT PKId PRIMARY KEY CLUSTERED (Id));
    GO
    BEGIN TRAN
    ALTER INDEX PK
    Id ON dbo.Test REBUILD WITH (ONLINE = OFF);
    GO

    Then in another window, try to query sys.identity_columns with dirty reads:

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
    SELECT * FROM sys.identity_columns WITH (NOLOCK);

    (I know, those two isolation level…

    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 →
  20. Unable to deply Tabular model in 1500 compatibilty, but in 1400 works

    I can't deploy my model to SSAS 2019 RTM in compatibility level 1500. If I change to 1400, I can deploy it without problems to the very same instance of SSAS 2019.

    Error is from events log: The description for Event ID 22 from source MSOLAP$TABULAR cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was…

    6 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 →
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base