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.1 Crashes when Opening a Database Diagram

    SSMS 18.1 crashes (and restarts) when opening a database diagram without any error message.

    I have created several diagrams from scratch thinking it might have to do with old formatting, but this does not appear to be the case.

    You can edit a diagram (adding dozens of tables) with no problem. It is the opening of the diagram that results in the crash.

    Latest bits for SSMS and SQL Server 2017 installed today.

    SQL Server Management Studio 15.0.18131.0
    Microsoft Analysis Services Client Tools 15.0.1347.0
    Microsoft Data Access Components (MDAC) 10.0.18362.1
    Microsoft MSXML 3.0 6.0
    Microsoft Internet Explorer 9.11.18362.0
    Microsoft .NET…

    1,004 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    529 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. 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 →
  3. 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 →
  4. SSMS 15.0.18330.0 import bacpac failed

    With the latest SSMS 15.0.18330.0 I'm unable to restore an Azure SQL Bacpac, error is triggered when "Importing datase".

    If I try to get more details (clicking on the "Error" link), I get an NRE :

    TITLE: Microsoft SQL Server Management Studio

    Object reference not set to an instance of an object. (Microsoft.Data.Tools.Schema.Sql)

    at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateFragment(Int32 operation, IModelElement element)
    at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateSteps(Int32 operation, IModelElement element)
    at Microsoft.Data.Tools.Schema.Sql.Deployment.OrderedStepGenerator.Add(DeploymentScriptDomGenerator scriptDom, IModelElement element, Int32 operation)
    at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildDependencyOrderedSteps(Int32 operation, List1 classOrder, List1 operationOrder, Dictionary2 changes, Boolean preserveGraphs, Dictionary2& relating, Dictionary2& related)
    at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildOperations()
    at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.OnGeneratePlan()
    at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.GeneratePlan(List
    1 drops)
    at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.BuildPlan() …

    8 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 →
    under review  ·  Matteo Taveggia responded

    Thanks for reporting this issue. I may have to reach out to the DacFx Team.

    Would you be able to share the bacpac with us, perhaps on OneDrive or equivalent? I do understand that it may contain sensitive information and may not be an option for you.

    Thanks,
    -Matteo

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

    10 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 →
  6. SQL 2019 15.0.2070.41: Out of memory, page allocation fails when using Scalar-valued function in Where -clause

    Instance crashes to OOM using Scalar-valued functions when Scalar UDF Inlining is turned ON and function is used on WHERE -clause. Not dependent on SQL memory as it always consumes all memory available to instance.

    Simple function (i.e returning date) fails when used on WHERE clause and page allocation from MEMORYCLERKSQLOPTIMIZER allocates all memory even with fresh database when TSQL-SCALARUDF_INLINING is ON.

    Working query with function:
    declare @dt as datetime='2019-12-01'
    declare @dt2 as datetime='2019-12-20'
    declare @d as datetime = dbo.datereturn(@dt2,'ENDOFDAY')
    select * from TABLE where field_date between @dt and @d

    Broken query with function in WHERE -clause:
    declare…

    25 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. 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 =
    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. 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 →
  9. [CONFIRMED] [BUG]: SSMS 18.2 = OK, 18.3.1 = BUG

    It turns out than in Windows 10 LTSC (haven't tried other versions) in SSMS 18.3.1 onwards up to 18.5, in the table designer, when you are creating a column and switch cell using the TAB key, Windows's beep sound effect plays.

    I can confirm this does NOT happen in SSMS 18.2, which is a bummer because I really want to stay on the edge and use the latest & greatest versions.

    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 →
    started  ·  Matteo Taveggia responded

    Thanks for reporting this issue. I’ve already started looking into…

    Thanks,
    -Matteo

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

    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 →
  11. Enable SSIS Double Hop authentication to work with Windows Defender Credential Guard

    Windows Defender Credential Guard enabled machines only allow Kerberos Constrained delegation. SSIS double hop authentication will not work with either full delegation or constrained delegation once Credential Guard is enabled. Connecting to an Integration Services catalog server and executing a package from a Credential Guard enabled client will fail with “NT AUTHORITY\ANONYMOUS LOGON”.

    Enabling SSIS to work with constrained delegation is imperative for us since the Credential Guard security feature is enabled in our environment and I am certain that many out there are dealing with the same issue.

    14 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 →
  12. SQL Package on linux looks for dacpac external dacpacs with UPPCASE filenames regardless of the original

    When restoring a dacpac that references another dacpac (linked server) sqlpackage expect that the filename is DATABASE.DACPAC regardless of what the original filename was.

    Replication steps:
    Create 2 projects of type SQL Server Database projects in visual studio, use title case DatabaseOne DatabaseTwo
    Add a database reference from DatabaseOne to DatabaseTwo
    Build Grab the outputted dacpac files
    On a Linux machine / container use sqlpackage to restore the dacpac of DatabaseOne.dacpac

    Expected
    DatabaseOne and DatebaseTwo are published

    Actual
    sqlpackage fails looking for \original path\DATABASETWO.DACPAC

    5 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. Cannot script external table in SSMS 18.2

    I receive the error message attached when trying to script an external table in SQL Azure in SSMS 18.2.

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

    We’ll send you updates on this idea

    started  ·  17 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  14. Unable to deploy SSIS packages from Visual Studio 2017 (15.8.0)

    The latest version of Visual Studio 2017 (15.8.0) appears to have introduced a bug preventing deployment of SSIS project files.

    When attempting to connect to a server the deployment wizard returns the following error:

    TITLE: SQL Server Integration Services

    Could not load file or assembly 'Microsoft.SqlServer.Management.IntegrationServicesEnum, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) (mscorlib)


    ADDITIONAL INFORMATION:

    The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) (mscorlib)


    BUTTONS:

    OK

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

    We’ll send you updates on this idea

    under review  ·  93 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  15. SSMS 18.0 tabs don't display proper contents

    I'm getting this CONSTANTLY on my new install of SSMS 18.0, and it's DANGEROUS. I'll open several tabs, and when I switch from one tab to another, the contents of the window don't change... I'm still looking at the old tab's contents with the new tab selected. It doesn't ALWAYS happen, but it happens at least half the time... FREQUENTLY. Further, I can close a tab, and the contents of the closed tab will still display under the new "top most" tab. This can lead to making changes to the wrong file, or being confused, and losing code. This is…

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

    We’ll send you updates on this idea

    22 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  16. No need to implicitly grant DUI permissions on the objects included in the stored procedure when the user has only execute permission on it

    /Now if created a login as below:/

    USE [master]
    GO

    CREATE LOGIN [userx] WITH PASSWORD=N'P@ssw0rd', DEFAULTDATABASE=[master], DEFAULTLANGUAGE=[usenglish], CHECKEXPIRATION=OFF, CHECK_POLICY=OFF
    GO

    ALTER LOGIN [userx] Enable
    GO

    /then created a user inside a database with only the public role:/

    USE [test]
    GO
    CREATE USER [userx] FOR LOGIN [userx]
    GO

    / then created a database role with the below securables:/

    CREATE ROLE [db_executer]
    GO

    use [test]
    GO
    GRANT EXECUTE TO [dbexecuter]
    GO
    use [test]
    GO
    DENY DELETE TO [db
    executer]
    GO
    use [test]
    GO
    DENY INSERT TO [dbexecuter]
    GO
    use [test]
    GO

    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 →
  17. SQL Server 2019 CU3 CE 150 Invalid object name 'days'

    We get following error after testing our code on SQL Server 2019 CU3 in compatibility level 150. Error doesn't happen in 140.

    Msg 208, Level 16, State 1, Procedure udf_GetTicketDurationDays, Line 29 [Batch Start Line 0]
    Invalid object name 'days'.

    days is a CTE.

    Compared to other error that I submitted this one doesn't happen always. I get it once when running and then running it again it works fine. Then same thing will happen in other area of the application with another function that's doing same thing with CTE inside a function.

    Hope you can replicate it as well…

    1 vote
    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 →
  18. SSMS 18.4 IntelliSense does not recognize proper nodes column reference with exist() method

    Here is a simple T-SQL, parsing xml

    DECLARE @xml xml = '<A>b</A>'

    SELECT

    x.c.exist(&#39;.&#39;) as Yes
    

    FROM @xml.nodes('A') x(c)

    Run it. It's valid T-SQL

    Note that IntelliSense highlights "x.c.exist('.')"
    Hover hint shows that column 'c' cannot be used directly, but only can be used with ...exist method.

    That is exactly what I am using it with, in working T-SQL code.

    Therefore it is IntelliSense bug.

    See attachment as well

    2 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 →
  19. Wrong Results When Selecting SQLServer2016 JOIN DATETIME2(3) with DATETIME

    I'm getting unexpected results when joining between DATETIME2(3) column to DATETIME column with PK , in SQLServer 2016.

    The details are :

    I have the following table:

    CREATE TABLE DATETIME_TEST (

    [DATETIME] DATETIME   NOT NULL,
    
    [DATETIME2_3] DATETIME2(3));

    ALTER TABLE DATETIMETEST ADD CONSTRAINT PKDATETIMETEST PRIMARY KEY ([DATETIME]);
    INSERT INTO DATETIME
    TEST
    ( [DATETIME],[DATETIME2_3])
    VALUES
    ('20020202 02:02:02.000', '20020202 02:02:02.000' ),
    ('20020202 02:02:02.003', '20020202 02:02:02.003' ),
    ('20020202 02:02:02.007', '20020202 02:02:02.007' ),
    ('2019-04-28 07:23:29.447', '2019-04-28 07:23:29.447' )
    ;

    SELECT * FROM DATETIMETEST WHERE CONVERT(DATETIME2(3), [DATETIME]) = [DATETIME23]
    The results :

    DATETIME DATETIME2_3
    2002-02-02 02:02:02.000 2002-02-02 02:02:02.000
    2002-02-02 02:02:02.003 2002-02-02…

    57 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. BUG CU19 SSAS. Cannot deploy metadata. Altering the referenced object is not permitted

    Error SSAS: Cannot deploy metadata. Reason: Failed to save modifications to the server. Error returned: 'The table referenced by the PerspectiveTable object 'xxxx' in perspective '' cannot be altered. Altering the referenced object is not permitted.

    Good afternoon. I am working with SQL Server 2017 Enterprise Edition and also with SSAS. The Analisys Services server is for hosting tabular models and has a compatibility level of 1200. Until recently, I had been able to make modifications to metrics and columns to the tabular model without any problem and had been able to deploy the DB to the Analisys Services server.…

    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 →
← Previous 1 3 4 5 263 264
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base