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.

Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. 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.

    37 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 →
  2. Allow Asymmetric Key to be created from binary hex bytes string just like CREATE CERTIFICATE (SQLCLR / SSDT / Module Signing)

    Creating an Asymmetric Key (for the purpose of creating an associated Login to provide { EXTERNAL ACCESS | UNSAFE } ASSEMBLY permission for SQLCLR Assemblies and hence avoid setting TRUSTWORTHY ON) requires a file or EKM provider or Assembly. Prior to SQL Server 2017 it was at least possible to load an Assembly (marked as SAFE) that is signed with the same private key into [master] to then create the Asymmetric Key from, and then drop the Assembly.

    But, with SQL Server 2017, ALL Assemblies will require being signed with a matching key / cert -based Login having the UNSAFE…

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

    We’ll send you updates on this idea

    6 comments  ·  Setup + Deployment  ·  Flag idea as inappropriate…  ·  Admin →
  3. 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.

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

  4. 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…

    32 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 →
  5. 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…

    32 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 →
  6. 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

    32 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.…

  7. 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 →
  8. Removing dependency of MDS on SilverLight.

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

    30 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 →
  9. 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 →
  10. 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

    30 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 →
  11. 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.

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

    We’ll send you updates on this idea

    14 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…

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

    29 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 →
  13. 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 →
  14. [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

    28 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 →
  15. 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…

    28 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 →
  16. Implement Batch Mode Support for Row Store

    I would love to see the Batch Mode implemented for the Row Store, it would bring a major improvement to the query execution plans performance.
    With current data growth explosion almost no OLTP system is working on couple of hundreds of rows, the real numbers are moving very fast into millions.

    OLTP systems can't be viewed only from the perspective of writing the data, where in fact small amounts of data are processed, but when dealing with a constantly increasing number of rows read - this situation needs to be addressed.

    I constantly see systems where index scan operators are…

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

    We’ll send you updates on this idea

    1 comment  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 81

    <=-=Aug 5 2014 8:28AM=-=>

    As far as I understand the current (SQL Server 2014) implementation of the Batch Mode, the Delta-Stores are already being processed in Batch Mode which means that the algorithm per se is already able to work with a b-tree HEAPs (Row Storage).

    <=-=Mar 3 2017 9:38AM=-=>

    Nico,
    I’m working on this feature right now. It won’t make the next version, but I’d really like to talk to you about what use cases you see for it. There is more to the work than just enabling the optimizer to consider batch mode plans over a rowstore.
    I’ll start an offline conversation about some of the particulars.
    Kevin

  17. Multi-threaded rebuilds of Clustered Columnstore Indexes break the sequence of pre-sorted segment ordering (Order Clustering)

    In order to get a better performance as well as compression results, we can sort the data in a RowStore engine before creating Columnstore Index to get a better Segment Elimination.

    What happens is that if we build a Clustered Columnstore directly after sorted RowStore with (DROP_EXISTING=ON) to get a perfect Order Clustering, we have the order maintained just partially.

    To test it, download ContosoRetailDW (http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=18279),
    and run the following script:

    ALTER TABLE dbo.[FactOnlineSales] DROP CONSTRAINT [FK_FactOnlineSales_DimCurrency];
    ALTER TABLE dbo.[FactOnlineSales] DROP CONSTRAINT [FK_FactOnlineSales_DimCustomer];
    ALTER TABLE dbo.[FactOnlineSales] DROP CONSTRAINT [FK_FactOnlineSales_DimDate];
    ALTER TABLE dbo.[FactOnlineSales] DROP CONSTRAINT [FK_FactOnlineSales_DimProduct];
    ALTER TABLE dbo.[FactOnlineSales]…

    26 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: 47

    <=-=Jul 3 2014 10:03AM=-=>

    This would definitely be a good build. I walked through an initial investigation of clustered columnstore on one of our data sets, and the number of reads was reduced by about 80% for some queries in the workload once I started paying careful attention to segments and loading data in a single-threaded manner to optimize segment elimination. However, this results in slower loading of data, and it would be great to be able to create columnstore indexes in order for segment elimination.

    Having an optional ORDER BY clause for the columnstore initial creation, removing the need to first create a clustered index in order to control order and allowing parallelism without breaking order, would be particularly powerful.

    <=-=Jul 3 2014 10:30AM=-=>

    Neugebauer: thanks. you identified the issue correctly. This is something we are actively looking. One question
    (1) once the index is build, the…

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

    26 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

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

    26 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 →
  20. Change the way Script Task/Components are handled in SSIS

    When having to work with script task or components inside of SSIS it becomes quiet tedious because the loading times are exessive and the functionalities are rather limited.
    I would like to propose a new form of Script Task, a Script Task v2 if you will. Instead of just exposing a subset of VS making this Script Task a proper C#/VB.net proj that compiles down to a dll. That has a Main Class that implements an interface that contains a execute-method.
    These Projects would be added to the SSIS Solution as seperate Projects offering everything from Nuget to properly allowing…

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

SQL Server

Feedback and Knowledge Base