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. Please release documentation on data classification categories (GDPR)

    It would be great to have all the corresponding "Information Type" and "Sensitivity level", and their associated GUIDs documented.
    With this, I would be able to add these classifications directly in my DACPAC model as extended properties.

    Examples :
    57845286-7598-22F5-9659-15B24AEB125E / Name
    989ADC05-3F3F-0588-A635-F475B994915B / Confidential - GDPR

    2 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
    • 2 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
      • Make the FIRST_VALUE() and LAST_VALUE() functions more clear that they are not opposites by default.

        FIRST_VALUE() and LAST_VALUE():

        1) Modify the top-line descriptions to make them _not_ sound like exact opposites.
        2) Add a very basic example comparing the two, much like the example comparing the ranking functions.

        Please see the following forum post for a longer explanation:
        https://social.msdn.microsoft.com/Forums/sqlserver/en-US/29adf6a3-330a-422a-8f26-c01fcfdff285/

        2 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
        • managed_backup.sp_backup_config_schedule days_of_week parameter does not accept multiple days for a weekly backup

          I am unable to schedule a managed backup with a custom weekly schedule to occur on multiple days. The documentation says that the days_of_week parameter will accept a comma-separates list of full day names, but when you actually try to execute the proc, you get this error: "The value specified for parameter @days_of_week is not valid. A valid scheduling parameter is required."

          This can be easily reproduced by running this script:

          EXEC managed_backup.sp_backup_config_schedule
          @database_name = 'state_your_db_name'
          ,@scheduling_option = 'Custom'
          ,@full_backup_freq_type = 'Weekly'
          ,@days_of_week = 'Tuesday,Saturday'
          ,@backup_begin_time = '07:00'
          ,@backup_duration = '02:00'
          ,@log_backup_freq = '00:05'

          2 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
          • Database-level audit actions do not log parameter values

            According to Microsoft SQL 2014 and SQL 2016 documentation (https://msdn.microsoft.com/en-us/library/cc280663(v=sql.120).aspx) the following is by design :

            "Considerations

            Database-level audit actions do not apply to Columns.
            When the query processor parameterizes the query, the parameter can appear in the audit event log instead of the column values of the query. "

            This limitation is very restrictive and undermines the functionality and usefulness of SQL Database audits for any auditing of databases where the logging of parameter value is important. For updates, delete and insert audits the parameter values is very important.

            To overcome this limitation, we've have had to…

            1 vote
            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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →

              Upvotes: 3

              <=-=Jan 24 2017 4:30AM=-=>

              Thank you for taking time to post this suggestion.

              Unfortunately, there is currently no workaround for this issue. We might consider including it as an improvement in one of our future releases.

              However, please note that this functionality is available in Azure SQL DB auditing. Additional info about Azure SQL DB auditing can be found in our Getting Started guide: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-auditing-get-started

              Thanks,
              Gilad

            • sys.dm_exec_sql_text.dbid is not always populated

              Books Online says about this column.

              "ID of database.

              For ad hoc and prepared SQL statements, the ID of the database where the statements were compiled."

              However, it seems that dbid is NULL when the text is not from a stored procedure. This bug should be fixed, as the current state makes it very difficult to answer questions like "which are the 5 most expensive queries in this database".

              Surely, it is not the documentation that is wrong, is it?

              1 vote
              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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
              • SQL Server Project - Create external data source fails (BLOB_STORAGE)

                I'm trying to create an external data source using "Create external data source" (MS docs topic).
                Locally, it works just fine and when I execute the script to bulk insert the file from Azure Storage, it works (even though SSMS and Visual Studio highlights 'BLOB_STORAGE' with red):

                IF NOT EXISTS (SELECT * FROM sys.external_data_sources WHERE name = 'AzureBlobStorage')
                CREATE EXTERNAL DATA SOURCE AzureBlobStorage
                WITH ( TYPE = BLOB_STORAGE, LOCATION = 'https://myblob.blob.core.windows.net');

                --BULK INSERT from Blob Storage
                BULK INSERT [dbo].[Document]
                FROM 'files/Documents.csv'
                WITH (DATA_SOURCE = 'AzureBlobStorage', KEEPIDENTITY, FIELDTERMINATOR = '|', FIRSTROW = 2, ROWTERMINATOR = '\n', KEEPNULLS);

                Documentation states…

                1 vote
                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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                • Books Online: FROM Topic: no Common Table Expression

                  This regards the "FROM (Transact-SQL)" Books Online topic
                  https://docs.microsoft.com/en-us/sql/t-sql/queries/from-transact-sql

                  The BNF for "<table_source> ::=" does not include any references for common table expressions (CTEs). Are the "WITH ( < table_hint > [ [ , ]...n ] )" options available for a "table_or_view_name" also available for CTEs?

                  1 vote
                  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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                  • SQL Plan Cache is flushed for a database post ALTER DATABASE operation

                    This behaviour was first noticed recently when a highly transactional database was set to BULK LOGGED recovery mode, in which the partial plan cache (the cache specific to a database) is clearing after performing this operation. Furthermore I have heard from fellow MCM Ignacio Alonso Portillo that this happens for ANY change to a database (via ALTER DATABASE). I have not seen so far any documentation describing this behavior within SQL Books Online or MSDN, including the page Considerations for Switching from the Full or Bulk-Logged Recovery Model found here http://technet.microsoft.com/en-us/library/ms190203(v=sql.105).aspx. It seems to occur in 2008 up to…

                    0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                    • SQL Required Permission Verification

                      SQL Server needs to be able to check if required permissions created by a SQL Server installation are present. Group policy is often out of the control of a DBA. I have had to look at permission details many times over the past few years. Now that service SIDs are the norm, its more common that required permissions created by a SQL Server install are removed by group policy by mistake. The rights might not be removed for hours or days after an install - even longer if the removal is the result of a policy or machine OU change.

                      0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                      • Documentation of SQL-Server Express database size limit is worng

                        As written on
                        http://blogs.msdn.com/b/sqlexpress/archive/2010/04/21/database-size-limit-increased-to-10gb-in-sql-server-2008-r2-express.aspx

                        and recited countless times all over the web,
                        and probably you'd find it on a few pages on MSDN,
                        the new limit of SQL-Server express is 10 GB, up from 4 GB in the old version.

                        However, the actual limit is neither 10GB nor 10GiB, it's actually 10'240MB (10 * 1'024 MB).
                        This is neither 10 GB (10 * 10E9 Bytes) nor is it 10GiB (10'737'418'240 Bytes).

                        It's only 95% of what I would have interpreted as being 10GiB (10'240'000'000*100/10'737'418'240 Bytes).

                        This is definitely a bug in the documentation, and may also be considered fraudulent advertising.

                        0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                        • AlwaysON secondaries are not readonly in sys.databases

                          As per the msdn documentation available, AlwaysON secondaries can act as readonly database, however when we check for is_read_only column in sys.databases or the properties of the secondary database, it is not set as readonly. This is really inconvenient and should be documented if not fixed. In our environment, we have many jobs which perform certain tasks based on database availability mode, for instance update statistics job which ignores to update statistics of readonly database. All those jobs have started to fail. We migrated to SQL 2012 from SQL 2005, fix or documentation around such changes would have been much…

                          0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                          • SQL datatype "rowversion" doesn't actually exist in SQL server

                            According to the documentation (http://msdn.microsoft.com/en-us/library/ms182776.aspx) the rowversion datatype exists and the synonym "timestamp" is acceptable for backwards compatibility but it is deprecated and any DDL statements should be updated to use rowversion instead of timestamp. However, the actual name of the type in sys.types is still displaying as "timestamp" (as of SQL 2012 SP1 at least, I assume the same is true in SQL 2014), and even if a column is created using rowversion any scripts that generate the table will use timestamp. Also, the "Design Table" GUI within SSMS only has timestamp available in the dropdown list…

                            0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                            • LAST_VALUE not applying correct default window

                              We have a query where the following two statements yield different results:
                              (correct result)
                              LAST_VALUE(x) OVER (PARTITION BY y ORDER BY CAST(z as int) RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
                              (invalid result)
                              LAST_VALUE(x) OVER (PARTITION BY y ORDER BY CAST(z as int))

                              According to the documentation, the RANGE clause should "further limits the rows within the partition", but here it is used to expand based on the expected result.

                              0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                              • AlwaysOn and Multiple Instance Support documentation

                                RE: https://msdn.microsoft.com/en-us/library/ff878487(v=sql.110).aspx#DotNetHotfixes

                                Personally I Struggle with A WSFC node can host only one availability replica for a given availability group = one or more instances of SQL Server can host availability replicas for many availability gr oups and ive been unable to locate a decent online explanation of this Statement.

                                Ensure that the WSFC cluster contains sufficient nodes to support your availability group configurations.

                                A WSFC node can host only one availability replica for a given availability group. On a given WSFC node, one or more instances of SQL Server can host availability replicas for many availability groups.

                                Ask your…

                                0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                • CHECK_POLICY is a no-op with CREATE LOGIN ... PASSWORD ... HASHED

                                  If I try to create a login with a password that obviously doesn't meet the local password policy:

                                  CREATE LOGIN x WITH PASSWORD = N'y', CHECK_POLICY = ON;

                                  I get the error you would expect:

                                  Msg 15118, Level 16, State 1
                                  Password validation failed. The password does not meet Windows policy requirements because it is not complex enough.

                                  However, if I create a login with that simple password and bypass the policy check, I can easily see what the password would hash to:

                                  CREATE LOGIN y WITH PASSWORD = N'y', CHECK_POLICY = OFF;
                                  SELECT password_hash FROM sys.sql_logins WHERE name =…

                                  0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Update required in documentation, legacy OS referenced in affinity mask configuration option.

                                    In the documentation for SQL Server 2012/2014 on the affinity mask Server Configuration Option page the first paragraph of the main body makes reference to legacy Windows Operating Systems, "To carry out multitasking, Microsoft Windows 2000 and Windows Server 2003 sometimes...". There are also other additional references to the legacy Operating System versions throughout the documentation.

                                    Given that Windows 2000 is not supported and 2003 is about to become unsupported and neither is a supported version for SQL Server 2012 or 2014, this should be updated to reflect either the current versions of the Operating System family or alternatively be…

                                    0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                    • EncryptByKey fails without indicating error through @error nor raising exception

                                      EncryptByKey fails without indicating error through @error nor raising exception.

                                      Our Algorithm is AES_256 and we using symmetric Key.

                                      We successfully encrypt 7943, but failed without error indication at 7944.

                                      Doc says API returns NULL, if any of the following is true:

                                      a) I the key is not open
                                      b) If the key does not exist
                                      c) If the key is a deprecated RC4 key
                                      d) If database is not in compatibility level 110 or higher

                                      The error we encountered is not documented.

                                      But, I think this is not just a Technical Documentation issue, where the text needs to be…

                                      0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →

                                        Upvotes: 1

                                        <=-=Nov 21 2015 9:42AM=-=>

                                        More verbose steps described in SQL Server � Cell Level Encryption � Data Size ( https://danieladeniji.wordpress.com/2015/11/20/sql-server-cell-level-encryption-data-size/ )

                                        <=-=Nov 23 2015 12:23PM=-=>

                                        Thank you for pointing this out – we are looking into fixing this.

                                        <=-=Nov 23 2015 1:01PM=-=>

                                        jack:

                                        Thanks so much. I am touched by your quick and affirming feedback.

                                        Please see if you can look at Item 1902555, as well.

                                        In sincere gratitude,

                                        Daniel

                                      • Database Mail (sp_send_dbmail) fails when there are more than 20 mails to be sent

                                        According to documentation "Database Mail is an enterprise solution for sending e-mail messages from the SQL Server Database Engine. Using Database Mail, your database applications can send e-mail messages to users. The messages can contain query results, and can also include files from any resource on your network" and "Database Mail is designed for reliability, scalability, security, and supportability" which is mentioned to be the benefit of using Database Mail.

                                        Hence we decided to use Database Mail for sending mails from within a database based application. Sending mails fails when there are more than 20 entries to be sent with…

                                        0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →

                                          Upvotes: 3

                                          <=-=Oct 15 2015 9:59AM=-=>

                                          Hello,
                                          Can you check if timeout configuration valie for mail account resolves your problem?

                                          KB Article:
                                          https://support.microsoft.com/en-us/kb/968834

                                          https://technet.microsoft.com/en-us/library/ms188381(v=sql.110).aspx
                                          Example:
                                          EXECUTE msdb.dbo.sysmail_update_account_sp
                                          @account_name = ‘local’
                                          , @timeout = 60 — 60 seconds

                                          — Get all accounts
                                          exec sysmail_help_account_sp

                                          — Assumes that you Account name ‘Local’ ’s accountid = 1
                                          exec sysmail_help_admin_account_sp @account_id= 1

                                          Thanks
                                          Sethu Srinivasan [MSFT]

                                          <=-=Oct 19 2015 7:12AM=-=>

                                          Hello,

                                          we checked the timeout configuration parameter, but when we set the parameter (60 seconds) we ran into other problems:
                                          1) AccountRetryAttempts set to 1 and AccountRetryDelay set to 60 then all 30 e-mails of our test set where sent but some twice
                                          2) AccountRetryAttempts set to 0 then all e-mails of our test set where sent but some still had status retrying.

                                          Hence modifying timeout is no real option because in case 1 it’s not known which e-mails are being sent…

                                        • SSAS Linear Regression Model gives Invalid Node Distribution

                                          Documentation states that for LR models, the node distribution table has 2 rows ( type 1 and 3) which describe the target attribute. All other rows of type 7,8,9 describe regressors, and a type 11 which is the intercept value. I have a model which is giving a type 1 row with a t.value of Missing for one of the regressors.. After having creating millions of models, this is happening now for the first time, and only on a single model, but it is killing my programs.

                                          0 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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1
                                          • Don't see your idea?

                                          SQL Server

                                          Feedback and Knowledge Base