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. OVER clause enhancement request - DISTINCT clause for aggregate functions

    SQL Server 2005 introduced only partial support for the OVER clause. It is our strong belief that a more complete implementation of the OVER clause should be prioritized highly in consideration for future enhancements in SQL Server. A more complete implementation of the OVER clause can help in solving many common business problems with simpler, more intuitive, and faster solutions than available today and also substantially reduce the need for cursors.
    The following paper details the feature enhancement requests:
    http://tsql.solidq.com/OVER_Clause_and_Ordered_Calculations.doc
    The current feedback item addresses the OVER clause enhancement request - DISTINCT clause for aggregate functions, discussed in the paper…

    22 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: 577

    <=-=Dec 13 2007 3:33PM=-=>

    Dear Itzik.

    Thanks a lot for your feedback… and the strong voting support for this feature. Indeed, as you know, I am very much in favor of extending our functionality in this area. For a variety of reasons we did not get this into SQL Server 2008, but we are certainly looking into it for a future release.

    Keep the votes and comments coming…
    Michael

    PS: My apologies for the late official reply…

    <=-=Mar 10 2009 4:37PM=-=>

    I am a big fan of the ranking functions and partition by clause. I used them extensively. It was a fantastic inclusion in 2005. However, I can’t tell the number of times I wished DISTINCT worked with the count function. I can’t believe it wasn’t included in 2008!! So I’ve added my vote to get this in ASAP.

    <=-=Sep 15 2009 7:08AM=-=>

    yes this would be…

  2. Installation option for Lock Pages in Memory

    I would like to have an option to set Lock Pages in Memory in the SQL Server command line installation.

    Something like this:

    /SQLSVCLOCKPAGESINMEMORY

    https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

    22 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 →
  3. 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…)
    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 →
  4. SSRS Emailing Reports Should allow password & encryption for GDPR compliance & Extra Security

    When configuring SSRS to email a report on a schedule, it does not allow the files to be encrypted or to be password protected. For GDPR compliance this should be added to protect data that is sent by email or other delivery mechanisms.

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

    We’ll send you updates on this idea

    0 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  5. provide lpad/rpad funtion

    In 15 years of sql server development, was the lack of native lpad/rpad string funtions, one of the main pain. Please provide native left padding (lpad) and right padding (rpad) funtions.
    Every main DBMS supports this function, except MS SQL Server.
    I think this an easy subject that has to be changed.

    The follwolling DBMS supports rpad/lpad:
    - Oracle
    - Postgresql ()
    - MySQL
    - DB2
    - Informix

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

    We’ll send you updates on this idea

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

    Upvotes: 1

    <=-=May 29 2017 1:07PM=-=>

    Thanks you for the idea. We will keep it into the backlog but we cannot guarantee when it would be implemented. We have already added several new string functions STRING_AGG, TRIM, TRANSLATE, and it would be good to add more. We are prioritizing functions that might be added so we cannot confirm when we will add this one.

  6. Add Central Management Server support to Azure SQL Database

    Registering a new Central Management Server currently requires msdb and as such, we cannot register a Central Management Server in an Azure SQL Database. It would be great to have this feature to help support managing on-premise database instances as well as Azure SQL Servers.

    21 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 →
  7. Add array-support to SQL server engine

    Arrays are a core part of programming, except in SQL-server, where they don't exist.

    PostgreSQL has had array support for over 15 years (version 7.1 in 2001) by now...
    https://www.postgresql.org/docs/current/static/arrays.html

    And yet, in the year 2016, in the MS-universe, we still can't even parametrize an IN-clause in a SIMPLE & performant way, for example in a table-valued function or when passing a multiple-choice drop-down selection from SQL-Server reporting-services, or the combination of the two...

    Instead, there are a multitude of horrible, error-prone, complicated, user-unfriendly, slow & unperformant ways of working around the problem. For example, when you need to prevent…

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

    We’ll send you updates on this idea

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

    Upvotes: 6

    <=-=Mar 3 2017 2:00PM=-=>

    We are aware that this is important missing feature; however, we have no plans to add this in the near future. We will keep this request in backlog to see how many votes will get.

    <=-=Jul 1 2017 7:03PM=-=>

    Can’t even remember how many times I’ve wished to have this in SQL server.

    If you want to get a somewhat realistic feel of how talked about this feature really is, you can check out the number of votes and more importantly views that this StackOverflow question has:

    https://stackoverflow.com/questions/1732613/how-to-declare-array-inside-sql-server-stored-procedure

    Unfortunately, not many people visit this website and participate in voting here so it’s not a reliable indicator of how much any particular feature is requested. Please consider moving to UserVoice. Visual Studio UserVoice for example has loads more activity.

    <=-=Jul 1 2017 11:17PM=-=>

    We totally understand that t-sql as a language itself is desigened to…

  8. Add a KEEP NULLS clause as part of the UNPIVOT operator's syntax

    With the current design of the UNPIVOT operator, SQL Server implicitly removes rows where the unpivoted measure is NULL. Consider for example a table called CustOrders with the following data:

    custid 2017 2018 2019
    ------- ---------- ---------- ----------
    1 NULL 2022.50 2250.50
    2 88.80 799.75 514.40
    3 403.20 5960.78 660.00
    4 1379.00 6406.90 5604.75
    5 4324.40 13849.02 6754.16
    6 NULL 1079.80 2160.00
    7 9986.20 7817.88 730.00
    8 982.00 3026.85 224.00
    9 4074.28 11208.36 6680.61
    10 1832.80 7630.25 11338.56
    11 479.40 3179.50 2431.00
    12 NULL 238.00 1576.80
    13 100.80 NULL NULL
    14 1674.22 6516.40 4158.26
    15 2169.00 1128.00 513.75
    16 NULL…

    19 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 →
  9. Dark Theme in SSMS 2017

    I am new here. Using SQL server for maybe 1 year and I am really sad because you don't have the dark theme... I hope you will be available it soon, thanks :)

    i can do something like this: https://www.sqlshack.com/setting-up-the-dark-theme-in-sql-server-management-studio/, but it not as good as original :/

    19 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. Reporting Services subscription jobs naming

    SSRS creates subscription job names with the guid of the schedule. Result: messy lists of SSRS Agent jobs and user defined Jobs in SSMS.

    SSRS should have a (configurable) prefix like SSRS; job name would be: SSRS.16EDA7C0-D3DB-4E0F-9394-A8E8C570BB77

    19 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 →
  11. Add a "delete" option for JSON_MODIFY() to remove deleted keys instead of setting them to NULL

    Originally based on this Connect item: https://connect.microsoft.com/SQLServer/feedback/details/3120404

    The JSON_MODIFY delete functionality via NULL works inconsistently. On properties, NULL removes the item from the JSON completely. On arrays, NULL nullifies the value but does not remove it from the array.

    Example:
    -- Our JSON data with three properties:
    DECLARE @data nvarchar(100) = JSON_QUERY('{ "Property1" : "A", "Property2" : "B", "Property3" : "C" }')
    -- Output: { "Property1" : "A", "Property2" : "B", "Property3" : "C" }

    -- Deleting the second property with NULL completely removes it from our JSON:
    SELECT JSON_MODIFY(@data, '$.Property2', NULL)
    -- Output: { "Property1" : "A", "Property3" :…

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

    Upvotes: 10

    <=-=Apr 10 2017 4:40AM=-=>

    Thanks for the feedback. We agree with your proposal and this request is in our backlog. We will let people to vote for this. Also feel free to report any other option that you find useful. Note that we cannot commit when this request ill be implemented, because it depends on the number of votes and schedule.

  12. Eager Index Spools Should Generate Wait Stats

    In query plans where an Eager Index Spool is directly after a data access operator, wait stats should be generated while the Spool is built. In a parallel plan, EXECSYNC waits are generated, but in a serial plan, you don't see anything. Problem scenarios will become more common when FROID is released and adopted.

    I would not expect this to happen when a Lazy Index Spool occurs above a subtree.

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

    We’ll send you updates on this idea

    0 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  13. sys.dm_os_sys_info/ms_ticks in Azure SQL DB

    It is often useful, when doing real-time activity monitoring, to be able to understand when workers are spending a long time sitting on the runnable queue after entering a wait state.

    This information is available in the on-prem product by using the sys.dm_os_workers DMV, which gives numbers in terms of "ms_ticks." Converting these ticks to actual clock time requires pulling an "ms_ticks" value from the sys.dm_os_sys_info DMV.

    Unfortunately, Microsoft pulled the latter DMV from Azure SQL DB, making this information completely inaccessible. And it would be quite useful there, especially when DTU throttling is taking place.

    My request is to…

    18 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 →
  14. The optimizer should considering materialising results of CTEs

    If you refer to a CTE multiple times in a query, SQL Server will in practice compute the CTE for every appearance. This means that in some situations as a user it is better for me to materialise the result into a temp table, and then run a query on a temp table. On the other hand there are situations where this adds extra overhead, and causes the entire batch to run slower.

    Below is an example with a query where a CTE/temp table is self-join three times. The idea of the query is to show the change in order…

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

    We’ll send you updates on this idea

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

    Upvotes: 25

    <=-=Jan 30 2011 2:35PM=-=>

    Adam Mechanic and I have asked for hints to force materialization (218968 and 483181); however, I’d settle for auto-magic from the optimizer!

    <=-=Jan 31 2011 9:30AM=-=>

    Thanks for the feedback, Erland. This is a known issue and we’ll consider it for a future release. It’s not something we’ll be able to do anything about for Denali RTM though. We appreciate your suggestion!

    Best regards,
    Eric Hanson
    Program Manager
    SQL Server Query Processing

    <=-=Feb 3 2011 11:26AM=-=> Thanks Michael! -Eric <=-=Jan 31 2012 10:21AM=-=>

    We closed this as a duplicate. -Eric

  15. Relax restriction that table parameters must be readonly when SPs call each other.

    I was excited when I heard that Katmai would have table parameters, but I was
    equally disappointed to hear that they would be readonly. Today programmers
    employ various tricks to pass table data between stored procedures - or give up
    and use cursors to call procedures row by row.

    While only readonly table parameters is useful when passing data from client to
    server, they are of little use when stored procedures call each other.

    For a longer discussion why read-write table parameters are essential, see
    http://www.sommarskog.se/tableparam.html where I discuss the topic in more
    detail, and argues more strongly than the…

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

    Upvotes: 337

    <=-=Oct 1 2007 2:40AM=-=>

    I could not agree less.This is more of ‘SHOULD HAVE’ and every T-SQL developer would love SQL server even more should this be implemented.

    <=-=Oct 4 2007 2:22PM=-=>

    I agree. Microsoft, if you’re listening, please implement this!

    <=-=Oct 10 2007 7:33AM=-=>

    I think it is very important.

    Alex Kuznetsov,
    SQL Server MVP

    <=-=Oct 22 2007 2:25AM=-=>

    I agree. It would be a very nice and powerfull feature in SQL server 2008.

    <=-=Oct 22 2007 5:57AM=-=>

    Unless there is a very good reason not to, I urge you to implement it, it would be very useful.

    <=-=Nov 4 2007 11:40AM=-=>

    TVPs should definitely not be limited to being read-only. Without updateability, they will be perceived as an “impaired” new feature. As lead author in the upcoming Programming Microsoft SQL Server 2008 book by MS Press, I urge the SQL team to support…

  16. Provide a way to update SSDT system database reference DACPACs

    Please provide a method for updating the master.dacpac and model.dacpac reference databases that install with SSDT.

    The versions that install with SSDT are static and do not reflect any changes/enhancements/bug-fixes that are made within SQL Server.

    For example, the SQL Server 2017 master.dacpac is missing the new system DMV's [sys].[dm_os_host_info] and [sys].[dm_db_log_stats], and the recently released SQL Server 2016 SP2 adds a new DMV [sys].[dm_db_log_info] and new columns to the DMV [sys].[dm_os_sys_info] which will be missing from the SQL Server 2016 master.dacpac.

    Any referenes to new DMV's/columns generate 71502 (unresolved reference) errors. The workaround is to ignore these errors, but…

    17 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 →
  17. Permit TRUNCATE TABLE when referencing tables are empty

    TRUNCATE TABLE is an efficient command to empty a table, as deallocates all extents and the extend allocation is all that is logged.

    However, its usefulness is reduced by the fact that you cannot use it when there are referencing foreign keys. In the general case, this makes sense, as if the referencing table has data, truncating the table is almost bound to cause a constraint violation. The exception is if all rows in the referencing table has a NULL value in the FK column, but verifying this could be expensive.

    However, you may want to use TRUNCATE TABLE on…

    17 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. Please add the Scroll bar to the Parameters section in SSRS Report Manager like in SSDT

    When viewing a SSRS report on a device with a smaller screen, such as an iPad or iPhone, if there are several parameters, it takes up a lot of space, and with SSRS 2016, it does not scroll out of view - only the report section scrolls.
    Could you please provide scroll bar for parameters section in Report Manager like in SSDT.

    17 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 →
  19. Major Columnstore Performance Enhancement: ALTER INDEX REBUILD WITH (ORDER BY (ColumnA, ColumnB, ...))

    Greetings SQL Server Columnstore Team,

    SQL Server's columnstore performance is highly dependent upon rowsegment elimination. We have been working with mssql16 and competing product memsql to prototype a financial timeseries tick database. We were able to get mssql16 to outperform memsql, however, it took substantial data re-load engineering on our part that we think would be better made available in the ALTER INDEX REBUILD command.

    // sample schema:
    CREATE TABLE trades(
    SecurityID int,
    DateTimeKey datetime2(7),
    Price float,
    Size float,
    Source char(4),
    ConditionCode char(4)
    );

    In mssql16, we partition this table on the datetime2 field (quarterly partitions). Nearly all of our…

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

    We’ll send you updates on this idea

    0 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
  20. Provide a hint to force intermediate materialization of CTEs or derived tables

    When working with SQL Server CTEs or derived tables, the query optimizer is free to in-line the inner queries, thereby changing the physical processing characteristics of the query. This is generally a good thing, but in some cases we (database developers working with the product) can make a better decision that the query optimizer and need to override it. In many cases this is handled (join and query hints), but one place that we currently have no control is intermediate materialization of derived tables. There are many cases in which materializing the inner set first produces a much better plan,…

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

    Upvotes: 174

    <=-=Oct 12 2006 2:21PM=-=>

    Dear Adam,

    Thanks for your feedback. I think this idea has quite a bit of merit. You would like a way to tell the query processor to evaluate query subexpressions in a constrained order. There is no perfect workaround right now. You could use a multi-statement TVF, but that is hard to program and hard to read. Your workaround requires an extra sort. We’ll consider this as an improvement for a future release.

    Regards,
    Eric

    <=-=Feb 4 2010 8:40AM=-=>

    SELECT x.EmployeeID,
    (
    SELECT COUNT_BIG(*)
    FROM HumanResources.Employee AS e
    WHERE e.ManagerId = x.ManagerID
    ) AS theCount
    FROM HumanResources.Employee AS x
    WHERE x.ManagerID IS NOT NULL;

    is also 4 logical reads – no materialization needed.

    In general, I’m not so sure about the need for this. If I truly need to materialize an intermediate result (which is typically quite small) I’m happy using a…

  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base