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.

    531 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

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

      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

        under review  ·  7 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…

        168 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 →
        • 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…

          152 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: 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…

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

            118 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  ·  4 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
            • develop a SSRS ReportViewer for ASP.NET Core

              Develop a SSRS ReportViewer for ASP.NET Core

              110 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  ·  15 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!

                95 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 →
                • 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.

                  82 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 →
                  • 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

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

                      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  ·  2 comments  ·  Suggestions  ·  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…

                        56 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  ·  7 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                        • Column Store Deadlock XML Is Missing Information

                          Deadlock XML for column store indexes is missing several pieces of information about which objects were deadlocked in the resource-list section of the XML

                          See here for background https://www.brentozar.com/archive/2018/04/column-store-deadlocks-missing-information/

                          Also attaching files.

                          49 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 →
                          • 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…

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

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

                              47 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  ·  10 comments  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                              • 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.

                                46 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  ·  13 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
                                • T-SQL Common Table Expression "Materialize" Option

                                  T-SQL Common Table Expression "Materialize" Option

                                  I have run into a couple performance and results issues using Common Table Expressions (CTEs).

                                  The first case is where I coded a data retrieval as a single, large query with a CTE that is referenced multiple times in the query. The CTE has an expensive query. I was able to determine, via execution plans, etc., that the results of the CTE were being recalculated multiple times, resulting in slow execution. I rewrote the data retrieval as multiple steps where the query of the CTE was first executed into a table variable, and I…

                                  46 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 →
                                  • Maintenance Plan Portability

                                    Maintenance Plans should be scriptable, deployable and maintainable without the need to manually create/update a plan on each server/instance. Current functionality requires the DBA to manually generate a SQL Maintenance Plan one at a time for each instance in the environment. Built in SQL Maintenance Plans should be scriptable, deployable and maintainable with TSQL or in some automated fashion that will allow deployment to large enterprise environments that do not require the use of a GUI.

                                    45 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  ·  6 comments  ·  Setup + Deployment  ·  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,…

                                      44 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 →
                                      • "Call Stack"

                                        Provide DMV to provide the call stack of stored procedures, triggers, CLR functions etc prefferable in JSON format so it is parsable.

                                        As Erland Sommarskog says this is available but only in the "event Blocked Process Report:

                                        <executionStack>
                                        <frame line="17" stmtstart="1332" stmtend="2906" sqlhandle="0x03000d00399f00558c840601a29800000100000000000000"/>
                                        <frame line="1" sqlhandle="0x01000d00638e300f302e10ac000000000000000000000000"/>
                                        </executionStack>

                                        That is, here the call stack is available. Through the sqlhandle it is possible to retrieve
                                        the objectids of the calling procedures.

                                        If if it's available this way, it can't be too difficult to expose this in a DMV. Only exposing the
                                        sqlhandle would not match with my observation with permissions above, but…

                                        39 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 →
                                        • Replace the import wizard with Power Query

                                          Instead of using the outdated import wizard (not the new one that was released recently in SSMS), a new one should be created that leverages the Power Query engine (aka the M language) to import data into SQL Server.

                                          36 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  ·  Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 400 401
                                          • Don't see your idea?

                                          SQL Server

                                          Feedback and Knowledge Base