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. Can't create DACPAC of a SQL Server 2019 DB with External ODBC Datasources

    when trying to extract a DACPAC for a SQL Server 2019 database with external datasources that use the new ODBC functionality in Polybase you get the following error (this happens both in Visual Studio 2019 and SSMS 18.3.1):

    TITLE: Microsoft SQL Server Management Studio

    Could not extract package from specified database.
    Error 0: An error occurred while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlExternalDataSource: Unsupported external data source type '6'.
    (Microsoft.SqlServer.Dac)


    ADDITIONAL INFORMATION:

    Unsupported external data source type '6'. (Microsoft.Data.Tools.Schema.Sql)


    BUTTONS:

    OK

    5 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 →
  2. function inlining

    In SQL Server 2019 function is marked as inlineable but it's not and query comes back with following error:

    Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.

    Looks like SQL Server 2019 doesn't properly identify if function is inlineable and throws error vs just not inline it.

    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 →
  3. Why does Find and Replace in SSMS 18.2 default to "All Open Documents"?!

    Why on earth does Find and Replace default to "All Open Documents"?!

    You don't know how many times I have replaced things in other query windows unintentionally. If I am fortunate, I catch it and do Ctrl-Z to undo it.

    Just now I did a replace, and SSMS froze while it happily did a replace in all the query windows I had open , to the tune of 63,514 replacements!

    A much more sensible default would be "Current Document". Or better yet, allow the default to be set under Tools... Options...

    Please change this.

    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 →
  4. SSMS Tools > Check for Updates doesn't fine new version

    I'm using SSMS v18.1, and I have the option to automatically check for updates. Even still, if I manually select Tools > Check for Updates, it dutifully tells me that I am on the latest version.

    But a simple web search reveals that v18.2 was released about three weeks ago.

    5 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 →
  5. SSMS Find and Replace "Look In" values change without user input

    RE. Find and Replace "Look In" drop-down:
    Desired behaviors:

    * Default to "Current Document"
    * Retain selected option until dialog is closed & reopened -- do not change "Look In" without user input.

    Current behaviors:
    In both SSMS 17.9.1 (14.0.17289.0) and 18.2 (15.0.18142.0), the Find and Replace dialog defaults "Look in:" to "All Open Documents". I would suggest the default should be "Current Document" (which I believe was the default in older versions)
    Much more dangerously, even after changing the default to another option, "Look In" reverts to "All Open Documents", which can cause unintended, undesirable, & unknown changes to…

    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 →
  6. SQL Server 2017 on Ubuntu Linux - Agent History size - unable to configure

    Hello,

    Steps from this document:

    https://docs.microsoft.com/en-us/sql/ssms/agent/resize-the-job-history-log?view=sql-server-2017

    Do not work on SQL Server 2017 on Linux and result in error below:

    USE [msdb]
    GO
    EXEC msdb.dbo.spsetsqlagentproperties @emailsaveinsent_folder=1,

        @databasemail_profile=N''
    

    GO
    USE [msdb]
    GO
    EXEC msdb.dbo.spsetsqlagentproperties @jobhistorymax_rows=10000,

        @email_save_in_sent_folder=1, 
    
    @databasemail_profile=N''

    Msg 0, Level 11, State 0, Line 2
    A severe error occurred on the current command. The results, if any, should be discarded.
    Msg 0, Level 11, State 0, Line 7
    A severe error occurred on the current command. The results, if any, should be discarded.

    SQL Server version:

    Microsoft SQL Server 2017 (RTM-CU14)…

    5 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 →
  7. SQL Server 2017 bad cardinality estimate on simple query

    I use SQL Server 2017, and does the following query:
    SELECT *
    FROM
    TESTToBeTransferredTemp a
    inner join TEST
    codes c on a.type = c.idstring

    This produces a simple execution plan, where the query estimate is far off. It estimates 49,5 rows, but the actual number of rows is 8002.

    TESTToBeTransferredTemp.[type] column is a non-null foreignkey to TESTcodes.IDSTRING, which in turn has a unique index/constraint.
    That information alone should tell the optimizer that the join will produce 8002 rows exactly.

    That is one problem. But, even if we assume and accept that the foreign-key and unique constriant arent…

    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 →
  8. [SMO] ScriptingOptions.ScriptForCreateDrop = true is being ignored

    ENVIRONMENT:
    Microsoft.SqlServer.SqlManagementObjects (150.18147.0)

    ISSUE:
    When using SMO's Scripter class to script database objects to a SQL file, ScriptingOptions.ScriptForCreateDrop = true is being ignored.

    ScriptMaker.ScriptUrns(List<Urn> orderedUrns) does check the ScriptingPreferences.Behavior property for the ScriptBehavior.DropAndCreate value, but ScriptingOptions.ScriptForCreateDrop never gets translated to a ScriptBehavior value in the first place. Instead, it resides in ScriptingPreferences.ScriptForCreateDrop, where it never gets used.

    EXPECTED BEHAVIOR:
    Setting ScriptingOptions.ScriptForCreateDrop = true should set ScriptingPreferences.Behavior = ScriptBehavior.DropAndCreate, so that drop and create statements are generated.

    WORKAROUND:
    Setting ScriptingOptions.scriptingPreferences.Behavior = ScriptBehavior.DropAndCreate via Reflection.

    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 →
  9. SSMS: Export of SSIS Project into ispac from Server doesn't wor

    when using the export function for an ssis project in SSMS 18.2 an error message comes up. The export fails and results in an an empty ispac file. Exporting the same project from the same server works with SSMS 17.9.1 but not with 18.2

    Info of SSMS which fails:
    SQL Server Management Studio 15.0.18142.0
    Microsoft Analysis Services Client Tools 15.0.1389.0
    Microsoft Data Access Components (MDAC) 10.0.14393.0
    Microsoft MSXML 3.0 4.0 6.0
    Microsoft Internet Explorer 9.11.14393.0
    Microsoft .NET Framework 4.0.30319.42000
    Operating System 10.0.14393

    ===================================

    Version of SSMS that succeeds:
    Microsoft SQL Server Management Studio 14.0.17289.0
    Microsoft Analysis Services Client Tools 14.0.1016.283 …

    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 →
  10. SSMS 18.2 - Can't copy text from find and replace window

    When I try to copy text from the find and replace window it fails with the message: "Unsaved documents cannot be cut or copied to the clipboard from the Miscellaneous Files project. You must save the unsaved document(s) before cutting or copying them." See attached screenshot.

    Text in the find/find and replace windows should always be copyable, regardless of whether the document has been saved or not.

    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 →
  11. Closing a query tab in SSMS can take a very long time and hang the app

    When I open new query tabs (e.g. by right-clicking a server in the registered servers or the object explorer and choosing "New Query"), it can take a few seconds for the new tab to appear and connect - that's acceptable, I understand opening a connection can take a short while.

    However, why does it take up to 10 seconds from clicking the x on the query tab until it's either closed or the "save changes" prompt appears? It can be very frustrating, because the entire app freezes during that time, and this can also prevent the computer from restarting.

    I…

    5 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. SSMS 18.1 issue

    When editing job step details
    (Open a job in Job activity monitor, go to Steps tab and edit job step),
    The SSMS hang and wait ~30-60 seconds before it opens the step details window.

    It happnes on every SQL engine I connect to, regardless the engine's version.
    It didn't happen on SSMS 17.9.

    My desktop is Windows 10 Enterprise 64bit.

    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 →
  13. ssms 18.0 - extended events - watch live data - filter dropdowns fail

    After setting up an extended events session, choosing to watch live data, I want to add a filter.
    In the filter dialog box I need to choose 'Field', 'Operator' and 'Value'.
    Both 'Field' and 'Operator' have dropdowns and when I attempt to click the dropdown, instead of showin the options the dropdown menu flashes in the upper right corner of my screen.
    I end up using the arrows on my keyboard to find the option I want

    SQL Server Management Studio 15.0.18118.0
    Microsoft Analysis Services Client Tools 15.0.1300.131
    Microsoft Data Access Components (MDAC) 10.0.14393.0
    Microsoft MSXML 3.0 6.0
    Microsoft Internet…

    5 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 →
  14. SQL server Import and Export Wizard missing/disabled SSMS 18.0

    SQL Server import and export is disabled in SSMS 18.0, is this temporary and available in later versions of 18 or we wouldn't have import export going forward?

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

    This is indeed an unintended removal. It only affected SQLEXPRESS.
    Thanks for the reporting it.
    We’ll fix it in a future release of SSMS 18.×.

  15. SQL 2019 CTP 2.4 Bug when querying a view which contains a [inline] scalar function which calls another [inline] scalar function.

    We are getting the following error in SQL 2019 CTP 2.4:

    Msg 596, Level 21, State 1, Line 1
    Cannot continue the execution because the session is in the kill state.
    Msg 0, Level 20, State 0, Line 1
    A severe error occurred on the current command. The results, if any, should be discarded.

    Turning off inlining for the database (ALTER DATABASE SCOPED CONFIGURATION SET TSQLSCALARUDF_INLINING = OFF), or redefining the functions using WITH INLINE = OFF fixes the issue.

    Is this a known limitation with inline functions? Or, could be this specific to our scalar functions?

    5 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: Object Explorer Filtering allows for SQL Injection (oops)

    When applying filters in Object Explorer (in any "Filter Settings" dialog) in SSMS 17.9.1 and 2018 Preview 6 (and possibly versions prior to 17), it is possible to inject SQL into the query executed by SSMS, simply by using a single quote / apostrophe. Yes, the app code clearly escapes a single apostrophe into two apostrophes, but the string containing the apostrophe is concatenated into a Dynamic SQL string executed via sp_executesql. The string entered via the UI to filter on is intended to be used within a string literal within the Dynamic SQL string. In this case I filtered…

    5 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 →
  17. T-SQL Comment throwing a syntax error

    If you execute this T-SQL comment:

    --(*
    

    SQL Server will throw an error:

    Msg 102, Level 15, State 1, Line 36
    
    Incorrect syntax near &#39;--(*&#39;.

    I don't see anything in the documentation for "--" that would lead me to believe that SQL Server parses anything after the two dashes (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/comment-transact-sql?view=sql-server-2017)

    What's going on?

    5 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 →
  18. Ssms.exe has had parameter -p (password) removed in SSMS 2018, why?

    In previous versions of the SSMS there has been a parameter to pass which states the password for the given user. Now it seems this option has been removed why?

    We have several seldom used databases with cryptic passwords which we cannot change so have them saved in a batch file for easy acces when needed. Now it seems that we can no longer use this approach.

    I understand the security risk in saving the password alongside the user information but it should still be an option if the user need it.

    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 →
  19. SQL Server CU Upgrade breaks MDS within an AG and cannot upgrade DB due to "distributed transaction"

    Pretty much as the title - currently we have MDS as part of an AG on SS 2017. Every single time we do a CU it breaks MDS and the MDS Configuration Tool Cannot upgrade the DB as required because it is part of a "distributed transaction" - we have to remove from AG, upgrade, backup, and import into secondary server and then readd to AG. Please can you fix this!?

    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 →
  20. InInvoke-sqlcmd returns no data if first result set is empty and others following that are not.

    Invoke-sqlcmd returns no data if first result set is empty and others following that are not.
    Invoke-SqlCmd "select 2 e, 3 d; select 1 a where 1=0; select 2 b, 3 c;"
    This only prints e d 2 3 , and does not print 2 b 3 c.
    Invoke-SqlCmd "select 1 a where 1=0; select 2 b, 3 c;"
    Does not print 2 b 3 c as the first query returns empty results.
    Is there a work around for this ?
    The issue is similar to :
    https://stackoverflow.com/questions/52913891/invoke-sqlcmd-fails-shows-no-results-on-certain-type-of-queries/52915961#52915961

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

SQL Server

Categories

Feedback and Knowledge Base