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. Bring Back TFS and Git in SSMS

    According to this post: https://blogs.technet.microsoft.com/dataplatforminsider/2016/11/21/source-control-in-sql-server-management-studio-ssms/ these features were removed "because they didn't fit in the overall experience" for SSMS. This seems like an incredibly short-sighted decision for your user base. Many SQL developers use SSMS specifically because it is lightweight and does not require the massive baggage and learning curve of the full VS. That doesn't mean we don't need source control or task tracking in our process. Removing functionality that integrates two Microsoft products seems like a massive step backward. The suggestion to "work around" this poor decision by manually editing a definition file comes across as particularly condescending,…

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

    We’ll send you updates on this idea

    3 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  2. DIVIDE function in T-SQL

    The languages MDX and DAX both have a DIVIDE function, which has the following syntax:

    DIVIDE(<numerator>, <denominator> [,<alternateresult>])
    The alternate result is specified as the result when a division by zero is encountered. If it isn't specified, NULL is returned.

    This would be a fine addition to the T-SQL language.

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

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  3. OPENROWSET T-SQL and MOLAP provider fail on complex DAX statements

    Running the OpenRowSet (SQL2016) against a SSAS 2017 on-premise or Azure SSAS will fail with error

    OLE DB provider "MSOLAP" for linked server "(null)" returned message "OLE DB error: OLE DB or ODBC error: An unexpected exception occurred.."

    T-SQL Statement:

    SELECT *
    FROM OpenRowset('MSOLAP','DATASOURCE=<Servername>;Initial Catalog=<cube>;User ID=<userid>;Password=<password>’,
    '<DAX STATEMENT>’)

    Running the DAX directly against SSAS (2017) returns the correct results, also the OpenRowSet command works fine in SSAS 2016 using the same DAX statement.

    Bug maybe due to the properties differences in the OpenRowSet implementation rather than the MOLAP provider (these are the XML properties included in the MDX query to…

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

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  4. Make is possible to retrieve all error messages in a CATCH handler

    When you trap an error in a CATCH handler, you can use the functions error_message, error_number etc to get information about the error. This works well, as long as only one error message is produced. However, there are situations where multiple error message. In this case you can only retrieve one error message, and with a bit of bad luck this is only a generic error message. A typical example is BACKUP-RESTORE:
    BEGIN TRY
    BACKUP DATABASE msdb TO DISK = 'X:\nosuchdisk\dxx.bak'
    END TRY
    BEGIN CATCH
    PRINT error_message()
    END CATCH

    The output is "BACKUP DATABASE is terminating abnormally." The message that…

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

    We’ll send you updates on this idea

    3 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  5. STRING_SPLIT Add Option to Return Row Number

    It would be really handy if the STRING_SPLIT function had an option/switch to return the row number in order to be able to use other windowing functions on the resultset.
    I found I still had to result to a CTE effectively making my own string splitting function which included the row number to then be able to apply other windowing functions such as a running total.

    This code helps to highlight the issue. In trying to apply a running total the results have to be ordered and the position of Susan and Michael is switched. Had a Row Number field…

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

    We’ll send you updates on this idea

    2 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  6. SQL2012 Could not locate Statistics on secondary replica

    When querying a table thru a linked server, got the following error message.

    Msg 2767, Level 16, State 1, Procedure sp_table_statistics2_rowset, Line 105
    Could not locate statistics '_WA_Sys_00000007_47DBAE45' in the system catalogs.

    The database was a secondary replica, primary replica was fine. Ran dbcc show statistics on secondary replica, that failed to find statistics distribution. There was an entry in sys.stats on both. Drop statistics on primary, to resolve.

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

    We’ll send you updates on this idea

    15 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 48

    <=-=Jul 9 2014 11:04PM=-=>

    This is happening to us, at least 3 times a week, on different tables in the database. The drop statistics on primary works, but the processes that are meant to run on the secondary via, linked servers are failing! A real pain!

    <=-=Apr 2 2015 1:38AM=-=>

    >A real pain!
    +1

    <=-=May 4 2015 3:39AM=-=>

    Microsoft folks – Can we please have some kind of explanation on why this happens for dynamic stats and on the asynchronous node only? It has been a real pain for us to manually drop the statistic on the primary node to clean up the corrupt statistic on the asynchronous secondary node.

    <=-=May 19 2015 11:48PM=-=>

    Clearing the userstore_dbmetadata related pools on ASYNC commit resolves the issue.
    DBCC FREESYSTEMCACHE (‘dbname’)

    Or create a stored procedure to check if the instance is an ASYNC commit, then clear the cache using an…

  7. Add Application-period temporal tables and Bitemporal tables to SQL Server 2016

    SQL Server 2016 has temporal tables however these are only for system period temporal tables.

    Please add Application-period temporal tables and Bitemporal tables similar to the existing feature in DB2.

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

    We’ll send you updates on this idea

    3 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 29

    <=-=Jul 27 2016 5:17PM=-=>

    This feature vastly simplifies development of certain types of applications. Would be interesting at least know if microsoft has some intention to implement it.

    <=-=Jul 27 2016 5:19PM=-=>

    A fully compliant implementation to ansi sql 2011 would nice too.

    <=-=Jul 28 2016 1:01AM=-=>

    I would also like to see bitemporal support added, it would be most useful!

    <=-=Mar 7 2017 11:54AM=-=>

    This feature would really help people trying to migrate their DBs from DB2 or Oracle to SQL Server that much easier.

  8. Named Parameters for User Defined Functions without EXEC

    Currently, stored procedures and scalar user-defined functions invoked with the EXEC keyword support named parameters.

    User-defined functions invoked as part of a SELECT or other statement require ordered parameter specification without parameter names.

    Specifying parameter names should be supported when invoked as part of a SELECT statement.

    When any parameters are named, all must be named,

    When any parameters are named, any omitted parameters should receive default values. Omitted parameters without default values should result in an error.

    See also:

    https://connect.microsoft.com/SQLServer/Feedback/Details/361449

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

    We’ll send you updates on this idea

    3 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 25

    <=-=Feb 7 2017 7:34PM=-=>

    Yes! I myself a use heavily inline table value functions and that would improve the clarity of their use even more!

    <=-=Mar 5 2017 2:48PM=-=>

    We understand the requirement, and it is good that it gets a lot of votes in very short period. It is in out backlog and we will consider it for some of the next releases; however, currently we cannot confirm when it will be implemented..

    <=-=Dec 22 2017 3:17PM=-=>

    This would be quite incredibly useful. When it was added to C#, it was a “so-what?” thing for me at the time – but now, I don’t know how I ever coded without named parameters. It has saved me countless hours getting things right the first time, and not chasing around dumb problems. I am sure the same would be true if SQL Server supported named parameters in User-Defined Functions.…

  9. Add SQL Code Formatter

    Please add a SQL code formatter to the query editor. It should work like the C# code formatter in Visual Studio except for SQL.

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

    We’ll send you updates on this idea

    4 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  10. Tempdb spill columns in sys.dm_exec_query_stats should account for batch mode operator spills

    I am testing against SQL Server 2017 RTM-CU4. As far as I can tell, only tempdb spills associated with row mode operators are tracked in the new columns for tempdb spills in sys.dm_exec_query_stats: last_spills, total_spills, max_spills, and min_spills. Spills for batch mode operators are not included. None of the documentation that I can find mentions this as a limitation, so I assume that this is a bug.

    Batch mode execution brings additional challenges around memory grant management and tempdb spills are common for the workloads that I look at. Adaptive query memory feedback is not always sufficient to resolve all…

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

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  11. Removing dependency of MDS on SilverLight.

    Removing dependency of MDS on SilverLight.
    This dependency is preventing MDS from being used outside of POCs.

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

    We’ll send you updates on this idea

    under review  ·  4 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →
  12. Scalar MAX function

    It would be nice to have a scalar MAX function (name it S_MAX) that returns a maximum of two numbers. Right now you have to use CASE or write your own TVF and CROSS APPLY it, both are quite clumsy. Same for minimum of two:

    SELECT
    S_MAX(1, 0) --yields 1
    ,S_MIN(1, 0) --yields 0

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

    We’ll send you updates on this idea

    under review  ·  5 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  13. Add sp_estimate_data_compression_savings to SQL Azure Database

    Now Data Compression is available in Azure SQL Database (https://msdn.microsoft.com/en-us/library/cc280449.aspx), but the sp_estimate_data_compression_savings is not available yet. The error message is:

    Msg 534, Level 16, State 1, Procedure sp_estimate_data_compression_savings, Line 20 [Batch Start Line 14]
    'sp_estimate_data_compression_savings' failed because it is not supported in the edition of this SQL Server instance 'MSSQLSERVER'. See books online for more details on feature support in different SQL Server editions.

    The workaround is to create another copy via database backup, compress and compare the table and index. But it takes more time, resource and money to get the result.

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

    We’ll send you updates on this idea

    3 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  14. Allow Updating Statistics on the Secondary Replicas of the Availability Groups

    Allow remote (on the secondary replicas) statistics update for the Availability Groups. Given that a lot of time the secondary replicas have extra resources
    Potentially this could lead into spreading & parallelising the statistics recalculation processes while doing maintenance or potentially even ad-hoc.
    The original idea behind this is described in the following blogpost – http://www.nikoport.com/2019/06/20/updating-statistics-on-secondary-replicas-of-the-availability-groups/

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

    We’ll send you updates on this idea

    under review  ·  2 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  15. SQL 2017 CU7 - using In-Memory OLTP table variable inside MSTF causes error

    The code from attached file causes error as:
    Msg 3628, Level 16, State 1, Line 39
    The Database Engine received a floating point exception from the operating system while processing a user request. Try the transaction again. If the problem persists, contact your system administrator.

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

    We’ll send you updates on this idea

    under review  ·  6 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  16. Identical symmetric keys do not work between SQL Server 2017 and other SQL Server version

    hi everybody!

    I believe, there is a general product issue in SQL Server 2017. The problem concerns encrypting & decrypting data using the same symmetric key on different servers.
    I have an issue in SQL Server 2017 CU3 (version 14.0.3015.40). I need to create identical symmetric keys on two servers of different versions, as it is described in MS article:

    https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/create-identical-symmetric-keys-on-two-servers

    These steps work well within and between different versions of SQL Servers (2012, 2014, 2016), but not between SQL Server 2017 and any other server.
    I can create identical symmetric keys on SQL Server 2012, 2014 and 2016. So…

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

    We’ll send you updates on this idea

    under review  ·  12 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  17. [Graph Database] Implementation of Transitive Closure and Transitive Reduction

    It'd be great to have the transitive closure and reduction implemented in SQL Server Graph Database. A lot of scenarios will benefit from them.

    Here a description of the two problems:
    https://goo.gl/j9U5nb

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

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  18. Indicate "morally equivalent" forced plan where use_plan = true but is_forced = 0

    Currently, if you force a plan in query store (or if it is forced by automatic plan correction), the exact plan which is forced has is_forced = 1 in sys.query_store_plan. In the plan properties, there is no use_plan indication.

    After this plan is forced, often a "morally equivalent" plan will be compiled, which has a different query_plan_id and different costs, but the same plan shape.

    This "morally equivalent plan" has is_forced = 0 in sys.query_store_plan. In the execution plan properties, use_plan = true.

    These "morally equivalent plans" are currently difficult to identify in the Query Store reports and in the…

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

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  19. Schema files have blank lines appended after schema compare

    After doing a schema compare from the DB to the project, most schema files have a blank line appended. This causes the files to be checked out of source control and then show as changes when they shouldn't

    27 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 →

    Upvotes: 19

    <=-=Mar 13 2015 2:44PM=-=>

    This is happening for me too; it’s been a long time issue in the SSDT. It creates noise when doing compares, merges, and checkins where these don’t pertain to the real changes of objects.

    Microsoft Visual Studio Ultimate 2013
    Version 12.0.31101.00 Update 4
    Microsoft .NET Framework
    Version 4.5.51209

    Installed Version: Ultimate

    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Microsoft Azure Websites

    NuGet Package Manager 2.8.50926.663
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    SQL Server Data Tools 12.0.50226.0
    Microsoft SQL Server Data Tools

    <=-=Apr 1 2015 10:31AM=-=>

    Thank you for submitting this feedback. We are investigating this issue and will update when we have more information.

    Steven Green
    SQL Server Data Tools team

    <=-=Feb 1 2016 11:30AM=-=>

    This is one of those issues that convinces me that nobody at MSFT

  20. Filtered index not used when IS NULL and key lookup with no output

    Filtered index not used when IS NULL is used. IS NOT NULL works fine, but IS NULL does a key lookup. Same as this issue but on different version of SQL Server
    https://connect.microsoft.com/SQLServer/feedback/details/454744/filtered-index-not-used-and-key-lookup-with-no-output

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

SQL Server

Categories

Feedback and Knowledge Base