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. SQL History SSMS

    In SSMS, keep track of all SQL run within SSMS and enable recall to run again. Store in local file/db. Do not store results but do store result stats. Such as Execution Time, Number of rows returned, date executed.

    Click to open in new window. Allow choice of connection to run against.

    25 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    planned  ·  2 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  2. 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…

    25 votes
    Sign in
    (thinking…)
    Password icon
    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

  3. Add built-in support for regular expressions in T-SQL

    LIKE is very limited in what it can differentiate. The CLR has much more robust handling for regular expressions, but it's hard to get to from T-SQL.

    Could we add built-in functionality in T-SQL to do regular expression pattern matching?

    25 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    Upvotes: 54

    <=-=Sep 4 2007 12:29PM=-=>

    If this is considered for a future version of SQL Server, please implement it according to the ISO SQL standard. In other words, implement the SQL Standard , which provides regular expression support through the operator [NOT] SIMILAR TO, which in the standard remains separate from LIKE.

    <=-=Sep 5 2007 7:05AM=-=>

    Like Steve, I would also like to stress that any implementation should be as per ANSI (SIMILAR predicate). The CLR functionality is not a relevant design consideration.

    <=-=Oct 15 2007 8:43AM=-=>

    This is a request we’ve heard a lot, and it’s of obvious value. I can’t promise when we’ll get to it—-it’s doubtful for this release—-but this is certainly on our radar.

    Cheers,
    -Isaac

    <=-=Mar 24 2010 2:54PM=-=>

    Hi,
    I have resolved this request as duplicate of feedback item below:

    https://connect.microsoft.com/SQLServer/feedback/details/261342/regex-functionality-in-pattern-matching?wa=wsignin1.0


    Umachandar, SQL Programmability Team

    <=-=Mar 24 2010…
  4. 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

    25 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  5 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  5. Database diagrams on new release 18 not work

    I installed SSMS 18.0 and cannot find Database diagrams folder. It is just missing. Where is the problem?

    24 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    18 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →
  6. 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…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  7. 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.

    24 votes
    Sign in
    (thinking…)
    Password icon
    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…

  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

    24 votes
    Sign in
    (thinking…)
    Password icon
    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. 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

    23 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 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

  10. Ability to run specific SQL Agent job steps

    Occasionally a user may need to run only specific steps of an agent job, or need the job stop after a certain step.

    While SQL Server Agent currently provides the ability to "Start job at step", this is all the flexibility the user has at runtime. Anything beyond that requires the job to be edited.

    It would be useful for those with permission only to run (not edit) jobs to have greater flexibility at runtime. E.g. a screen which allows the user to choose which steps to run or skip for that particular execution.

    22 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  11. Fix the Problem of Converting Hijri Dates to Gregorian Dates

    Currently Microsoft tsql function called Convert() is not able to convert the Hijri date 'yyyy-02-30' to its corresponding Gregorian Date, here are the details of this issue

    https://social.msdn.microsoft.com/Forums/en-US/b86b0cf6-280d-436e-ba92-ff168794c420/error-in-converting-hijri-date-to-gregorian-date?forum=sqlnetfx&prof=required

    22 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  12. Table of Contents in SSRS

    Reporting Services should allow the dynamic creation of a table of contents for a given report.

    The intial version should at least be able to state the page number of given objects (table, chart etc), with 'grouping' level links in subsequent releases.

    Interactive versions should contain hyperlinks to the given page.

    It should offer various styles as to how this may be achieved i.e. roman numerals for sections, filler dots for proportional width fonts between item and page number

    22 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    Upvotes: 25

    <=-=Jun 15 2010 3:54AM=-=>

    I completely agree.

    I’ve googled and can’t even find a work around to create a professional style report with a table of contents.

    Would be extremely useful.

    <=-=May 26 2011 8:15AM=-=>

    Agreed. This needs to be built into the product.

    In addition to what was said above, I would request that this table of contents page end up as page 1 when you export to PDF and end up as page 1 when you print. (The document map doesn’t print, and it only appears in the bookmarks tab in Adobe Reader.)

    A hack of a workaround is mentioned here. I�m not wild about it. We have to deploy a custom assembly� we have to store this info in a database table� we have to account for storing the page count per report per parameter combination per user (in case there�s data level user security).…

  13. Traceflag 460 causing truncation errors on code paths that are not followed

    This is an odd one. I have tested this on both SQL Server 2017 CU12 and CU13 (in a container and on my production boxes).

    If you have an IF/ELSE condition, and you are inserting into a table variable in the ELSE, and that INSERT would cause a truncation issue, it will throw an error, EVEN IF THE CODE IS NOT EXECUTED.

    I have attached a reprop script that creates a database called "Repro" and runs the code. When TF460 is enabled, the ELSE block with throw an error when inserting into a table variable, even though it is impossible…

    21 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  14. Columnstore REORGANIZE command increases modification_counter on table statistics

    Reorganizing a columnstore index can, in some cases, cause the modification_counter on the table's statistics to increase. This is unexpected because while the underlying structure of the table is being changed, the data itself isn't being modified. This can lead to issues where SQL is automatically updating statistics the next time a query is executed against the table in cases where the modification_counter increases a significant amount because of the REORGANIZE. This has been particularly problematic for our large fact table with 150+ billion rows and full scan statistics across 40+ columns.

    Attached is a reproduction script with three examples:

    21 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  15. Add columns has_victims and is_intra_query_deadlock to the event xml_deadlock_report

    When working with deadlocks I have found that it would be useful to to have some columns added to the event xml_deadlock_report.

    * has_victims - SQL Server sometimes generates large number of intra-query xml_deadlock_report - events with no victims, and no errors. It would be useful to be able to filter them out.

    * is_intra_query_deadlock - Intra-query deadlocks where the process is aborted (getting an error) are rather serious bugs in SQL Server.
    When working with Microsoft Support you are often asked for stack dumps. You can use extended events to generate stack dumps, but then it would be good…

    21 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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

    21 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  17. Database Diagram

    hello this version should have database diagrams, this tool is very util

    20 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →
  18. Query Store SELECT Performance

    Running a query against a large Query Store repository (10 GB) can be really slow if filtering on runtime stats intervals.

    It looks like an index is missing on sys.query_store_runtime_stats (runtime_stats_interval_id).

    20 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    Upvotes: 3

    <=-=May 27 2017 6:38AM=-=>

    Thank you for taking the time to post this issue! We understand that this could be an important performance improvement.
    Performance tuning is of such scenarios is not a trivial task. Change of such feature as Query Store can speed up one scenario and lead to degradation in others. We�ll look more into this particular use case and see what we can do.

  19. SQL Server Assertion: File: <lobss.cpp>, line = 725 Failed Assertion = '0' Should never happen.

    DBCC CHECKDB reports no errors, I rebuilt the indexes just to be sure. It happens when running this query:

    WITH t1 AS
    (
    SELECT [Endpoints].[Name] AS [f1],[MatchLocations].[Location] AS [f2],ISNULL(SUM([Matches].[LastCount]), 0) AS [f3],ROW_NUMBER() OVER (ORDER BY [Endpoints].[Name] ASC) AS [f4]
    FROM MatchLocations
    INNER JOIN [Matches] ON ([MatchLocations].[Id] = [Matches].[MatchLocationId])
    INNER JOIN [Endpoints] ON ([Endpoints].[Id] = [MatchLocations].[EndpointId])
    GROUP BY [Endpoints].[Name],[MatchLocations].[Location]
    )
    SELECT [t1].[f1] AS [t1_f1],[t1].[f2] AS [t1_f2],[t1].[f3] AS [t1_f3]
    FROM t1
    WHERE ([t1].[f4] BETWEEN 1 AND 100)
    ORDER BY [t1].[f4] ASC

    When the SUM and GROUP BY are removed, it runs just fine. It happens from time to time on some databases,…

    19 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  20. SQL 2017: "SET FMTONLY ON" doesn't return any resultset on UDF w/ COMPATIBILITY_LEVEL=140

    Our application uses at various places the SchemaOnly attribute (see https://msdn.microsoft.com/en-us/library/system.data.commandbehavior(v=vs.110).aspx). Lately, we noticed some strange errors when the application runs against a DB on SQL Server 2017. I boiled the issue down to the attached repro script in T-SQL, that shows clearly that SQL Server doesn' return any metadata, if a table-valued function is called using SET FMTONLY ON with COMPATIBILITY_LEVEL=140. But it works as expected using COMPATIBILITY_LEVEL=130. As I didn't find any word on this breaking change in the docs, I consider this a bug.

    19 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

SQL Server

Feedback and Knowledge Base