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. binary or string data would be truncated => error message enhancments

    if you have that error (in production), it's not obvious to see which column or row this error comes from, and how to locate it exactly.
    it's even more complicated if it's coming from a trigger, for example, and not the original insert/update.

    I have seen that oracle meanwhile gives clear information which column the error is raising, which actual data length was passed, and the column's max size.

    1,103 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)

      We’ll send you updates on this idea

      89 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    • Add a Keyboard Shortcut that Executes the Statement where the Cursor is placed

      Having to select statements by clicking and holding the mouse is just bad ergonomics. Request to have a keyboard shortcut which runs the current sql statement. The current sql statement is defined based on where the cursor is placed. For example, proposed shortcut runs only runs a single sql statement to the next semicolon. This shortcut would be an equivalent to Oracle's SQL developer's ctrl + enter shortcut. Note that this is probably the most used shortcut in SQL Developer and not having an equivalent on SQL Server Management Studio is disappointing. I know that not everyone ends their statements…

      237 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)

        We’ll send you updates on this idea

        7 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
      • Add FOR CSV to facilitate CSV export

        We have FOR XML and FOR JSON. But it is not uncommon that people want to produce CSV files. This can be done with BCP, but it is not straightforward not the least if you want to add headers. And if you only want fields to be quoted when needed, BCP is not really what you are looking for. SSIS is also an alternative, but SSIS does not always fit in.
        Thus, it would be handy if there was a an option like FOR CSV, with a syntax like:
        FOR CSV [, HEADERS] [,DELIMITER(',')] [, QUOTE('"')]

        HEADERS would mean that…

        217 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)

          We’ll send you updates on this idea

          under review  ·  8 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
        • Dark Theme for SQL Server Management Studio 2017 (SSMS 2017)

          Dark Theme works well in Visual Studio and should be included in SSMS. It helps reduce eye strain after long periods of development and debugging.

          206 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)

            We’ll send you updates on this idea

            unplanned  ·  14 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
          • Database Level Option For Storing Wait Stats

            SQL Server 2016 introduced Query Store, and SQL Server 2017 CU3 brought us aggregated wait stats at the query level. This is great information for data driven DBAs who need to be able to track plan changes over time, etc.

            With that in mind, an additional data collector for wait stats per database would be a great product feature, independent from Query Store data collection.

            We all know the limitations of the wait stats DMVs now:

            - They're cumulative over time
            - They're instance-wide
            - There's a lot of potential noise from wait types that aren't registered

            If you wanna…

            182 votes
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              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 →
            • Provide a mechanism for columns to automatically update themselves

              It is extremely common for databases to contain columns like "UpdatedDate," "UpdatedBy," etc. These columns work based on a trust model: As a database designer, I must trust that all of my downstream consumers will follow the intended rules, remembering to update the columns every single time any transaction occurs. And of course I have to trust that they'll put in the correct values. The only alternative to trust is to put ugly and potentially slow triggers in place to make sure everything happened the right way.

              This situation needs to change, and this is especially prevalent now, thanks to…

              180 votes
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)

                We’ll send you updates on this idea

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

                Upvotes: 249

                <=-=Oct 4 2016 2:15PM=-=>

                This is similar to my feedback located here: https://connect.microsoft.com/SQLServer/feedback/details/2769130/sql-2016-temporal-tables-with-triggers. The solution I suggest is similar to this, and could be used in many different cases developing using SQL server.

                <=-=Jan 10 2017 9:43AM=-=>

                I would love this too. The issue is that many/most applications don’t use Windows Auth in the connection to SQL Server (connection pooling issues, etc), so SQL can’t get the User information

                <=-=Jan 10 2017 9:51AM=-=>

                @Sanford

                Just to clarify, I am not asking for an “automatically store user name” feature. I’m asking for “automatically store whatever I want, based on whatever expression I provide.” So the fact that the user name may or may not be available is not really relevant.

                That said, there are plenty of workarounds for various situations. I imagine that if you’re using a shared connection, you can get some notion of “user” some other…

              • develop a SSRS ReportViewer for ASP.NET Core

                Develop a SSRS ReportViewer for ASP.NET Core

                146 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  under review  ·  25 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                • Enable Query Store for collection on a read-only replica in an Availability Group

                  Currently, Query Store can only be enabled for the read-write database in Availability Group. As many customers issue queries against the read-only replicas, capturing query and performance metrics for those queries would be beneficial for understanding the workload, troubleshooting performance issues, etc.

                  117 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    6 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                  • Easier identification of Implicit Transactions

                    Lots of ORMs let developers choose to enable implicit transactions, but there's no easy way to identity them without:

                    1. Running Profiler
                    2. Using the existing_connection XE session

                    Though it's a SET option, it's not included in the plan XML where SET options are identified, nor is it in sys.dm_exec_plan_attributes or sys.query_context_settings.

                    Using implicit transactions haphazardly can lead to some pretty nasty blocking chains. It should be much easier to identify when they're in use.

                    Thanks!

                    115 votes
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      under review  ·  4 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                    • MAX/MIN as NON-aggregate function

                      Please add the GREATEST/LEAST functions, just like in PostgreSQL/Oracle (with the same name for syntax-compatibility).
                      SQL-Server lacks functions for MAX/MIN as NON-aggregate function.
                      e.g. When I need the MAXIMUM of two values, or the minimum of two values (in columns, not rows).
                      When the value is a lengthy expression, it sucks having to write it in a case expression.
                      Also, the case-expression doesn't work for N > 2, and having to put it into a subselect-value-statement to use the aggregate functions as workaround affects readability severely (and thus maintainability).
                      Also, since SQL-server user-defined functions are damn slow, and on top…

                      90 votes
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

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

                        Upvotes: 8

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

                        Thanks for this idea. This is a valid requirement and I hope that it will get more votes. Currently we cannot confirm when it will be added, but it is in our backlog.

                        <=-=May 22 2017 5:03AM=-=>

                        would like it very much, particularly since you already have the CONCAT / GREATEST() a variable number of paramenters and does something with it…

                        <=-=Jun 5 2017 12:31PM=-=>

                        GREATEST / LEAST functions would be fantastic addition.

                        <=-=Nov 14 2017 3:42PM=-=>

                        The workarounds using CROSS APPLY or CASE expressions are difficult to manage and read. I’d love to see these implemented.

                      • Correctly escape predefined entities in deadlock XML

                        If you create a table that has &, ", <, or > in the name, it's not correctly escaped in all instances of deadlock XML.

                        This causes an error when trying to convert extended event/system health data to valid XML for analysis.

                        https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

                        88 votes
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          under review  ·  1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
                        • Provide XEvents target directly into SQL Server table

                          Provide a way to directly write XEvent output directly into a SQL Server database table in a same or different instance and same or different database.

                          The goal being to be able to not have any events missed but have the entire stream captured to the table and also provide header information for when the capture table was created for easier management and deletion. Ideally there should be a purge task that could be activated to clean out such captures after X days.

                          XEvents is a great and powerful tool.
                          Customers should have an easier way to get it directly…

                          88 votes
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                            under review  ·  2 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                          • Unlogged tables

                            For data warehouse staging tables or session state tables, when I don't want to change my application, I want to just specify CREATE TABLE AS UNLOGGED similar to how PostgreSQL does it. This way, my transaction logs aren't bloated, the data doesn't get copied around, and my inserts/updates/deletes are faster.

                            83 votes
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

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

                              Upvotes: 127

                              <=-=Jun 23 2015 8:37AM=-=>

                              I’m the first to post a useful comment. This must make me special.

                              Seriously though, this would be an excellent solution to having to create a new “scratchdb” to hold my interim ETL data. This would be a major plus in simplifying design of a high performance app.

                              <=-=Jul 3 2015 5:04AM=-=>

                              In 2014, memory optimized tables, and delayed durability can be used help mitigate these Issues. However neither of this are always completely viable solutions. Brent’s proposed solution is likely the simplest way to achieve this with the least amount of unwanted impact. It is important to note that other platforms implement similar functionality as well. Notably Oracle.

                              <=-=Nov 29 2016 3:58PM=-=>

                              There are so many good things about this suggestion. I am amazed that SQL does not have the capability to turn off logging for certain tables that you define as no…

                            • SSDT for Visual Studio 2017 - Include as part of the VS 2017 Installer

                              Can we please pass over the SSDT components to the Visual Studio team so this can be included as part of the Visual Studio 2017 installation process?

                              The VS team can then build out the installer in a way that SSDT is always compatible with their latest build and installer. We've been stuck with the break fix break fix loop with SSDT and incompatibility with VS upgrades for too long now. The SSDT team doesn't respond quickly enough, the latest example being SSDT 15.6/VS 2017 15.7.x installation issue, why are we waiting so long for an installer update?

                              81 votes
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                                under review  ·  3 comments  ·  Setup + Deployment  ·  Flag idea as inappropriate…  ·  Admin →
                              • Use column aliases directly in SELECT clause

                                It would be nice if queries like this were possible:

                                SELECT
                                A AS B
                                ,C AS D
                                ,D-B AS E
                                FROM table

                                In other words, use column directly in the SELECT clause where they are defined. Other database vendors have implemented this, so I assume it's not rocket science.

                                Right now, we have to use subqueries just to define an extra calculation.

                                74 votes
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                  under review  ·  11 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                                • Explain why indexes were skipped

                                  Feature request: expose information about what indexes the optimizer considered while compiling an execution plan. Specifically, the index names and WHY the index was rejected for that particular query. This could potentially be included in per-operator execution plan properties (see attached mockup), an extended event target, or some other avenue.

                                  Reason: many developers and DBAs wonder why certain indexes on their tables aren't being chosen for specific queries. This gives them better tools to figure that out and make better use of the SQL Server product.

                                  I've blogged about this feature request in more detail here: http://joshthecoder.com/2018/06/21/feature-request-index-rejection-reasons.html

                                  This request was…

                                  71 votes
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    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 →
                                  • Add a built-in table of numbers

                                    There are several SQL problems that can be solved with a table of numbers or dates.
                                    This is a simple one-column table with numbers from 1 and up. Typical common problems
                                    solved by with such a function:

                                    o Show me sales for all months, including months for which there were no sales.
                                    o Iterate over all characters in a string in a set-based statements.
                                    o Any other query which you need to drive with a consecutive seres.

                                    It's easy to construct and fill such a table. However, there are a couple of problems
                                    with it:
                                    1) If you query needs…

                                    66 votes
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)

                                      We’ll send you updates on this idea

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

                                      Upvotes: 278

                                      <=-=Feb 1 2008 7:18PM=-=>

                                      Thanks for the valuable suggestion.

                                      This seems more like adding the sequence support which we’re seriously considering for the next major release.

                                      Meanwhile, would using identity column help?

                                      <=-=Feb 2 2008 2:11AM=-=>

                                      It does not seem that you understood the request. This definitely has nothing to do with
                                      IDENTITY. I am less versed about sequences, but I don’t think they will cut it either. If you think
                                      it does, maybe you could provide an example? Take this problem: For the Orders table in
                                      Northwind, write a query that lists the number of orders for all days in 1997. The result set should
                                      include all 365 days, and list zero for days without a number.

                                      This is a typical problem where you need a table of of numbers (or dates). While it’s easy to
                                      create such a table, I argue in this request that…

                                    • SSIS Script tasks losing code

                                      I have a very strange issue happening that is causing Script Task code to clear out. I have been able to test on 2-3 different machines. We are running SSDT 15.4 preview. The steps to reproduce were as follows.

                                      1. Create a script task inside of a foreach loop container. 2. Create a comment in the script task. 3. Change or add a variable mapping in the foreach. 4. Save package. 5. Open the script task and the comment will have vanished.

                                      As my last attempt for success,I have upgraded to 15.5.1 and the problem still exists.

                                      64 votes
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        Signed in as (Sign out)

                                        We’ll send you updates on this idea

                                        under review  ·  16 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
                                      • In SQL Server Always oafter a failover, SQL Server keep the connections open without killing any session

                                        Hi Msft Team!
                                        I want to suggest one improvement to your sql server always on feature. Normally, once we perform failovers we need to ask app teams for maintenance windows... or in worst cases ,if this happens automatically, we need to discover the RCA of this because all the application or users connections had been terminated. Also many times that we had automatic failovers or perform failovers with long executions happening the secondary instance turned into recovery state because it was waiting for this session to finish to synchronize again. So, is it possible to add the capability for failovers…

                                        64 votes
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          Signed in as (Sign out)

                                          We’ll send you updates on this idea

                                          under review  ·  8 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                                        • SET STATISTICS IO should also show schema name for tables

                                          When you use schemas in your database, and you have the same table names in multiple schemas, it is not clear, which schema the table belongs too in the output of the SET STATISTICS IO. E.g. a table called Profile, or configuration in different schema is very common at our databases

                                          Today the output is just
                                          Table 'Profile'. Scan count 1, logical reads 123, physical reads 1, read-ahead reads 121, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
                                          Table 'Profile'. Scan count 3, logical reads 13, physical reads 1, read-ahead reads 342, lob logical reads 0,…

                                          64 votes
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            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 →
                                          ← Previous 1 3 4 5 413 414
                                          • Don't see your idea?

                                          SQL Server

                                          Feedback and Knowledge Base