SQL Server

Microsoft SQL Server 2017 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 2017 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. Unable to restore msdb and master from SQL Server 2017 to SQL Server 2019

    Unable to restore backup of msdb database created on SQL Server 2017(CU18) to SQL Server 2019(CU1).
    I get the following error:

    Msg 3167, Level 16, State 1, Line 10
    RESTORE could not start database 'msdb'.
    Msg 3013, Level 16, State 1, Line 10
    RESTORE DATABASE is terminating abnormally.
    Msg 701, Level 17, State 192, Line 10
    There is insufficient system memory in resource pool 'default' to run this query.

    The database stays in Recovery Pending state,

    I've tried with Developer and Enterprise Editions.
    There is plenty of RAM on this box (64GB total; Server Max Memory set to 54GB) and…

    2 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 →
  2. POWER() function (T-SQL) incorrect results

    The POWER() function in T-SQL returns incorrect results, starting at 10 to the power of 23.

    To reproduce, run this query:

    SELECT POWER(CONVERT(decimal(38,0),10),23)
    

    Expected result: 100000000000000000000000
    Actual result: 100000000000000008388608 (off by 8388608)

    Some more testing:

    SELECT POWER(CONVERT(decimal(38,0),10),22)
    

    Result: 10000000000000000000000 (correct)

    SELECT POWER(CONVERT(decimal(2,0),10),23)
    

    Result: 100000000000000008388608 (incorrect; expected: 100000000000000000000000)

    SELECT 10*POWER(CONVERT(decimal(38,0),10),22)
    

    Result: 100000000000000000000000 (correct)

    SELECT POWER(CONVERT(decimal(38,0),10),37)
    

    Result: 9999999999999999538762658202121142272 (incorrect; expected: 10000000000000000000000000000000000000)

    SELECT POWER(CONVERT(decimal(38,0),10),22)*POWER(CONVERT(decimal(38,0),10),15)
    

    Result: 10000000000000000000000000000000000000 (correct)

    SELECT POWER(CONVERT(decimal(38,0),10),38)
    

    Result: 99999999999999997748809823456034029568 (incorrect; expected: Arithmetic overflow error)

    Tested versions:
    Microsoft SQL Azure (RTM) - 12.0.2000.8 Dec 4 2019 21:24:18 Copyright (C) 2019 Microsoft Corporation
    Microsoft SQL Server 2017 (RTM-GDR) (KB4293803) - 14.0.2002.14 (X64) Jul…

    1 vote
    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. Replication Glitch: Clustered PK Update + Unique Index

    I found a replication glitch in SQL Server 2017 CU17.
    I have a table with clustered primary key plus a separate unique index (not constraint).
    I have standard transactional replication between separate VMs running SQL Server 2017 CU17.
    I updated the value in one of the primary key columns in a few rows in the publisher.
    The distribution agent (in the publisher instance) starts giving me this error.


    Command attempted:
    if @@trancount > 0 rollback tran
    (Transaction sequence number: 0x000048970000036900A100000000, Command ID: 1)

    Error messages:
    Cannot insert duplicate key row in object 'dbo.MyTable' with unique index 'UXRequestID'. The duplicate

    2 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. Why doesn't the activity monitor work on SQL managed instance

    Why doesn't the activity monitor work on SQL managed instance

    2 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 →
  5. $partition why is this keyword showing as error in SSMS? Can this be fixed?

    $partition keyword is listed as error but i do have partitions and it works when executed.

    Severity Code Description
    Error Incorrect syntax near '.'.

    Error Incorrect syntax near 'ownerdatabaseid'. Expecting '(', or SELECT.
    Error Incorrect syntax near 'ownerdatabaseid'. Expecting '(', or SELECT.
    Error Incorrect syntax near '1'. Expecting '(', or SELECT.

    1 vote
    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. SSDT 2019 Revoke Connect even when Users are ignored

    When I choose options to ignore User and Login actions in SSDT, but want to apply permissions (e.g. database roles assigned to procedures), "Revoke Connect to User" statements are being generated for database users. If I disable building those users, Revokes are still issued. I cannot find any combination of options to disregard User permissions but still apply role-based permissions completely. I am not able to build users because there is no filter to include/exclude users by environment (dev/test/prod). Either we need a way to easily map db objects to an environment, or a way to completely ignore all scripts…

    1 vote
    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 →
  7. Deviation from general expectations

    I did not know SQL Server queries were case sensitive. Did this change or this is a bug.

    Also when I select a user ->Right Click->Properties it crashes.

    It does not appear to be a stable version and yet that is the version listed on site since Nov 2019.

    1 vote
    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. Management Studio: Sort files in Template Explorer alphabetically

    It looks like the file list in a folder of the Management Studio Template Explorer is not sorted. (see the attached image) I would expect a sorted list there.

    It currently uses the unsorted filesystem-order a plain "dir"-command reports. It should use the sorted order of a "dir /O:N"-command instead.

    1 vote
    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. 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…
    5 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 →
  10. IntelliSense does not work within windows/analytical functions

    no IntelliSense suggestions pop up (even when the parenthesis are closed), for instance:
    ROW_NUMBER () OVER (PARTITION BY Gender ORDER BY BusinessEntityID)

    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 →
  11. Scalar UDF inlining causes truncation of returned string

    In a SQL Server 2019 database we create the following function:

    CREATE FUNCTION dbo.TEST1(@param varchar(10)) RETURNS varchar(10)
    AS
    BEGIN

    IF @param LIKE 'A%'
    
    RETURN 'S' + SUBSTRING(@param, 2, 9)
    ELSE IF @param LIKE 'B%'
    RETURN 'T' + SUBSTRING(@param, 2, 9)

    RETURN 'YYY'

    END

    Calling the function with
    SELECT dbo.TEST1('A12345')
    returns 'S12'

    We have to disable scalar UDF inlining to get the expected result 'S12345' (e.g. by using the DISABLETSQLSCALARUDFINLINING query hint or the TSQLSCALARUDF_INLINING database scoped configuration).

    It appears that the last RETURN statement defines the length of the result instead of the declared…

    1 vote
    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 →
  12. Management Studio shuts down when trying to open a database diagram

    Version 18.4. Created a new database diagram and saved it. When trying to open the diagram, management studio crashed and disappeared completed.

    1 vote
    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 →
  13. sp_add_feature_restriction - AAD userids and AAD groups

    ATP is recommending the config of new security feature : spaddfeature_restriction

    When applied to an AAD group or userid, we get an error: Msg 16304, Level 16, State 0, Procedure spaddfeature_restriction, Line 1 [Batch Start Line 4]
    'Unknown' is not an object class than can be restricted.

    Will this be fixed in the nearby future?
    Kindly produce documentation on this feature. Right now, there isn't any :( Only reviews.

    1 vote
    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. SSMS 18.4 is not ready for public use - fails at basic editing tasks

    After installing SSMs 18.4 and trying to do just simple editing tasks and switching between query windows, I found that the content of the edit window would not update and instead showed the contents of the previous tab. Pulling the tab out and placing it in a separate window solved this problem. But clearly this version is not ready for public usage, so I've gone back to using SSMS 2016.

    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 →
  15. Processes pane for Activity Monitor times out, auto-pausing all monitors

    As title. Bizarre and irritating. Resuming manually occasionally resolves it, but usually not. Closing and restarting SSMS (2017) occasionally resolves it, but usually not.

    1 vote
    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 →
  16. Linked server for Amazon Athena using IAMProfile authentication fails

    A linked server for Athena can be setup successfully using the authentication type 'AWS credentials', however, fails upon using 'IAMProfile'. The error seen is:

    "Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "athenatest".
    OLE DB provider "MSDASQL" for linked server "athenatest" returned message
    "[Simba][DriverIAMSupport] (8600) Connection Error: No AWS profile found: trial". (Microsoft SQL Server, Error: 7303)

    I am able to make a ODBC connection with IAMProfile option using the driver though. The credentials file is placed in the %USERPROFILE%.awscredentials directory.

    1 vote
    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 Design error

    GUI is not working in SSMS v18.4. Error message is displayed. The SQL Server is 2019 Developer Edition

    "TITLE: Microsoft SQL Server Management Studio

    This backend version is not supported to design database diagrams or tables. (MS Visual Database Tools)


    BUTTONS:

    OK

    1 vote
    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. analysis services command agent job warning

    SQL Server Agent job failure due to interpreting warning as error with Analysis Services Command job. The Command job actually complete successsfully with warning, but the agent job will fail. Running the same Command in SSMS will succeed with warning, Warning is not error and should not fail the Server Agent job.

    Description="Cannot order ''[] by [] because at least one value in [] has multiple distinct values in []. For example, you can sort [City] by [Region] because there is only one region for each city, but you cannot sort [Region] by [City] because there are multiple cities for…

    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 →
  19. Diagram checkboxes Print&Copy

    SSMS 18.4
    Diagram with table in the standard view shows "Allow Null" checkboxes.
    However, the checkbox marks neither appear in printed version of diagram nor in picture copied to clipboard.

    2 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. SQL Server Management Studio UI Scrambled

    Hi,

    I would like to ask why does my SQL Server Management Studio is not displaying properly?

    it does not seems to render properly, I tried to reinstall to but it still the same result. Please advise what may be the possible issue.

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

SQL Server

Categories

Feedback and Knowledge Base