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. Dark Theme

    Dark theme for SQL Server 2017 SSMS is missing.

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

    We’ll send you updates on this idea

    16 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  2. Attempting to create a database diagram causes error "Index was outside the bounds of the array"

    When attempting to create a new database diagram on an on premises SQL 2014 database using SQL Server Management Studio 16.5, an error window is shown with error "Index was outside the bounds of the array". Additionally, SSMS 2014 is able to create a database diagram just fine. When back in SSMS 2016, I can view the new diagram, but it is in a window on another monitor, with no ability to resize the window (window chrome is missing).

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

    We’ll send you updates on this idea

    28 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Hello all

    Database Diagrams is being deprecated for SSMS 18. As such, we have not planned any work on this feature for a while. Please use Visio or any of the 3rd party ER modeling tools for this functionality. I understand some of you may have dependency on this feature. You are welcome to continue using 17.9.1 if it works for you.

    thanks,
    Dinakar

  3. Debugging Stored Procedure in SQL Management Studio

    While debugging the yellow cursor-line will become misplaced (see attached image)

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

    We’ll send you updates on this idea

    unplanned  ·  6 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  4. Plain Text Password in Maintenance Plans

    The user and password of the user that create a Maintenance Plans using the MSSMS is save in plain text, you can use the following query to access this informaci�n.

    SELECT CAST(CAST(packagedata AS VARBINARY(max)) AS VARCHAR(max)) FROM sysssispackages
    WHERE name LIKE 'MaintenancePlansName'

    This will show the xml of Maintenance Plans including the user and password.

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  5. SQL Server should not raise illogical errors

    You already have tons of these bug reports, and I bet that you have closed them all "by design" and told people to use the CASE statement. But, no, you are wrong. This is a bug, and should be fixed. Although the fix is to add new functionality, hang on.

    Consider this silly repro:

    create table albert(a int NOT NULL,
    b varchar(23) NOT NULL)
    create table stina (a int NOT NULL)
    go
    insert albert (a, b)
    values (1, '99'),
    (2, 'Gurka'),
    (3, '89')
    insert stina (a) values(1), (3), (9), (12)
    go
    SELECT a.a, a.b + 100
    FROM albert a
    JOIN…

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

    We’ll send you updates on this idea

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

    Upvotes: 82

    <=-=Mar 3 2010 10:44AM=-=>

    Hi Erland,
    Thanks for your feedback. We are aware of this request and hope to address it in a future version of SQL Server.


    Umachandar, SQL Programmability Team

    <=-=Jul 21 2010 5:36PM=-=>

    This bug cost me and others about 8 hours of troubleshooting this week. And the query was working until statistics were updated. That’s the spooky part, that a new join order can cause an error in a previously-working query. This was compounded by the fact that the query was in a UDF and 1) error messages don’t list the line in the UDF but rather the calling SP and 2) I know of no way to see the execution plan of a UDF, which would have helped because I could have seen in the plan the conversion to float before the JOIN to the filtering table.

    <=-=Mar 9 2011 12:08PM=-=>

  6. CREATE OR ALTER is not fully supported in Transactional Replication DDL commands

    We've been having trouble with some objects not replicating correctly after a DDL change.

    When a published function or proc is altered, the following appears to happen:
    A database trigger is called: tr_MStran_alterschemaonly
    Which calls a proc called: sys.sp_MStran_ddlrepl - This proc will output debug IF MSrepl_debug_DDL exists (create anything called this!)
    which calls a function: master.sys.fn_replgetparsedddlcmd, which is designed to return the ddl after the object's name, to be used for generating the command to be applied 
    at the subscribers.

    SQL Server BOL states that ALTER is supported (https://docs.microsoft.com/en-us/sql/relational-databases/replication/publish/replicate-schema-changes?view=sql-server-2016)

    However, this doesn't appear to be the case:

    (13.0.4451.0):…

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  7. Cardinality Estimation Error With Pushed Predicate on a Lookup

    In SQL Server 2005, a filtering condition on a column retrieved from a Key Lookup is applied in an explicit Filter operator after an apply join.
    In SQL Server 2008 onward, this filter can be pushed down to the lookup during copy out, but cardinality estimates are not updated correctly.
    The post-filter cardinality estimate is applied to the inner side of the lookup join, rather than the result of the join as a whole.

    -- SQL Server 2005 AdventureWorks
    SELECT
    th.ProductID,
    th.TransactionID,
    th.TransactionDate
    FROM Production.TransactionHistory AS th
    WHERE
    th.ProductID = 1
    AND th.TransactionDate BETWEEN '20030901' AND '20031231';

    Estimate from index…

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

    We’ll send you updates on this idea

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

    Upvotes: 76

    <=-=Oct 26 2012 11:30AM=-=>

    Thanks for the feedback, we are looking into this request

    <=-=Sep 17 2013 2:44PM=-=>

    Thank you for submitting this feedback. After carefully evaluating all of the bugs in our pipeline, we are closing bugs that we will not fix in the current or future versions of SQL Server. This is because the fix is risky to implement.
    Thanks again for reporting the product issue and continued support in improving our product.

    <=-=Dec 2 2015 2:45AM=-=>

    This is something we are investigating, and needs thorough testing. This is so we do not introduce wide-spread regressions, like in cases when we had the CE underestimate, and then we would not have had not enough memory granted, leading to spills otherwise.

    <=-=Jan 3 2017 9:52AM=-=>

    Tested and confirmed fixed in SQL Server 2016 Service Pack 1 (build 13.0.4001.0)

    <=-=Jan 3 2017 10:23AM=-=>

    Actually, no. A related item…

  8. Partition Table using min/max functions and Top N - Index selection and performance

    Partitioned Tables performance issues - For select statements using Min and Max functions and Top N with ordering over an index.

    Poor performance is being detected for Queries on partitioned tables utilising the min and max functions and select Top N clause with "order by" matching columns of the index.

    The candidate index is either not being used or is being used to scan or seek all rows rather than a subset.

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

    We’ll send you updates on this idea

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

    Upvotes: 125

    <=-=Aug 10 2007 9:17PM=-=>

    Hi Microsoft, please confirm this optimizer problem by running the scripts, it is self evident and can be optimised significantly better.

    Eg. For a minimum, the optimal plan is to obtain the minimum for each partition using the index and then taking the minimum of all the (partition) results. The same principle can apply to maximum, and for Top N over an index …

    The plan should stand out as optimal, because the number of reads over the index is very small, and there will be one set of page reads (usually only one page) for each partition…. you can use the assumption that the number of partitions is significantly smaller than the number of rows (or even count the number of partitions), to estimate the cost (page reads) – which comes out at about N pages where N is the number of partitions.…

  9. MSIT-MSO: Debugging SQL Query fails with an error The EXECUTE permission was denied on the object 'sp_enable_sql_debug'

    When i connected to a server on which i have read-only access, and tried to start debugging; debugging failed with the following error. This makes user clueless what kind of access he needs as 'sp_enable_sql_debug' is not documented.

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Failed to start debugger

    ------------------------------
    ADDITIONAL INFORMATION:

    The EXECUTE permission was denied on the object 'sp_enable_sql_debug', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1442&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    And subsequently it errored out with

    ---------------------------
    Microsoft SQL Server Management Studio
    ---------------------------
    Unable to start program 'MSSQL:://msorguat/master/sys/=0'.
    ---------------------------
    OK
    ---------------------------

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

    We’ll send you updates on this idea

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

    Upvotes: 60

    <=-=Jun 18 2008 10:06AM=-=>

    Srikantj,

    The minimum security requirement is sysadmin. This is by design from SQL engine security.

    Regards,
    Eric

    <=-=Apr 23 2010 11:44AM=-=>

    How is that by design? Security best practices most definitely do NOT recommend making everyone an sysadmin.

    <=-=Sep 9 2010 6:58PM=-=>

    I agree with the last comment. If a developer in my shop wants to debug their code in their own database, I shouldn’t be forced to give them the ability to ‘DROP DATABASE master’ in order to accomplish that goal.

    Consider this a request for Microsoft to add something, a server role, a database role, or some other facility to grant a user permissions required to run the Debug facility in Management Studio.

    <=-=Jan 24 2011 10:05AM=-=>

    I agree with the users. sysadmin should be reserved for administration and contains to many rights for a standard developer who needs debugging capability.…

  10. Deprecation of sysprocesses - DMV's doesn't fully replace all columns

    According to BOL sysprocesses system view is on its way out of the product.

    The column (there may be others) dbid in sysprocesses can not be determined through the execution DMV's.

    sys.dm_exec_requests only shows currently executing sessions, so if a connection is inactive but still has context within a database there is no reliable way of determining this without the use of sysprocesses.

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

    We’ll send you updates on this idea

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

    Upvotes: 122

    <=-=Feb 12 2007 11:19AM=-=>

    Hi,

    Thanks for raising this issue. We are aware of this issue and will be fixing it in future releases of SQL Server. Unfortunately, at this point the fix cannot make it in for SP2.

    Regards,
    Tomer Verona
    SQL Server Development

    <=-=Feb 12 2007 9:31PM=-=>

    So long as the functionality of sysprocesses can be fully reproduced using DMV’s before it is deprecated from the product then I don’t see a problem.

    Thanks,
    Tony.

    <=-=Nov 19 2007 1:57PM=-=>

    Hi Tony,

    Our goal is to ensure that the replacement covers all necessary functionality before deprecating a feature. In this particular instance, we missed it and we will add it in a future release of SQL Server.

    Thanks,
    -Vineet Rao

    <=-=Feb 4 2008 9:30AM=-=>

    Please let us know if this is to be included in Katmai (CTP6/7) or reopen the issue until a timeline is established.

    <=-=Jul…
  11. "Add Azure Replica" button missing in SSMS 17.9. Present in SSMS 2016

    In the New Availability Group Wizard, the "Add Azure Replica" button is missing in SSMS 17.9 but is present in SSMS 2016 (130.0.16106.4). Is this a bug?

    I saw this related item: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/7512f490-5b30-49f0-b617-3eabce321015/add-azure-replica-button-missingnot-present?forum=sqldisasterrecovery

    Thank you!
    Mike Petrak

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

    We’ll send you updates on this idea

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

    Hi Mike,
    This is not really a bug.

    The button was removed from SSMS intentionally because SSMS only supported the “classic” resource provider, which was deprecated. As such, the functionality was not there anymore and there was no point in confusing the users by exposing something that was indeed broken.

    We encourage people to upvote this feedback item: this way we’ll be able to prioritize the request accordingly.

  12. Source Control Disabled by Default in SSMS 17

    Your have disabled the Source Control Provider option in SSMS 17 by default. What the hell were you thinking?

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

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  13. BULK INSERT with IDENTITY column creates query plan with SORT

    The attached sample demonstrates an unnecessary SORT operator when inserting into a table with an identity column even though the ORDER hint is specified on the BULK INSERT statement.

    The BULK INSERT time for table bulk101 with the IDENTITY column is 49 seconds

    The BULK INSERT time for table bulk102 without the IDENTITY column is 23 seconds.

    I don't see the need for the SORT operator.

    Also; there is no easy way to DROP/ADD the IDENITY property which really limits any workarounds.

    With a billion row table this make a big difference.

    Also; if I don't set KEEPIDENTIY, meaning new…

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

    We’ll send you updates on this idea

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

    Upvotes: 4

    <=-=Jun 6 2008 10:29AM=-=>

    Thanks for identifying this. we will consider this fix in the next release

    <=-=Jun 20 2015 1:30PM=-=>

    In SQL Server 2012 there is still Sort operator used when bulk loading into a table (empty) with Identity property, although data file is sorted and BULK INSERT is executed with ORDER hint.
    This issue was opened in 2008 and it’s still active, could you please fix it finally??
    It was really problematic back in the days when there was no workaround known as the one proposed in this issue, but do we really need to apply workarounds?
    This sort operator is not needed, that’s for sure.

    <=-=Sep 26 2017 7:15PM=-=>

    Still present in SQL Server 2017. This really should be addressed.

  14. Schema not reported in the ERROR_PROCEDURE function

    When an error is raised by the error handler, the name of the trigger/procedure is reported by the ERROR_PROCEDURE() function. However, it does not include the schema.

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

    We’ll send you updates on this idea

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

    Upvotes: 35

    <=-=May 1 2005 2:08PM=-=>

    Good catch, Louis! I will have to admit that I have not thought ot this, but you have certainly hit the nail on the head here.

    Then again, this is how the error message looks like without the catch handler:

    Msg 50000, Level 16, State 1, Procedure testErrorMessage, Line 4
    blech

    Note that only is schema missing – so is the database. And I am not really sure that it’s entirely good to add db.schema ahead of the name – there could be a compatibility issue.

    Maybe this is something for the next release.

    <=-=Nov 5 2007 9:50AM=-=>

    Hello Louis

    Thank you for your feedback. Please excuse the delayed response. I wanted to let you know that your feedback has been noted. As Erland pointed out, we would also need to consider whether to report the database name along with the schema. We will…

  15. Query hints not allowed after or inside IF EXISTS()

    Hugo Kornelis came up with an interesting problem when combining IF EXISTS() and certain query hints (e.g. to limit parallelism or to suppress warning messages).

    Microsoft is already aware of the issue internally, but I thought it would be beneficial to post it here both for visibility of the bug itself, and to expose the workaround I came up with (and any you may come up with, also).

    Basically, the problem is this. If I want to take this query, which works fine:

    SELECT *
    FROM sys.objects
    WHERE [name] LIKE '%foo%'
    OPTION (FORCE ORDER);

    And put it inside an IF…

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  16. Dark theme leaves blank spots in query editor on resize

    I have the dark theme enabled in SSMS 18, and when I resize the application window, or resize the results panel, huge chunks of my query editor get blacked-out. The text is still there, and the glitch goes away when I scroll around, but it's a pain, and it looks bad when I'm presenting my work.

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

    We’ll send you updates on this idea

    1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  17. Dark Theme in DevOps ignores color in textboxes

    The Dark Theme for DevOps works nicely in general, but text in textboxes does not show font color/background color.

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

    We’ll send you updates on this idea

    0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  18. NOT MATCHED and MATCHED parts of a SQL MERGE statement are not optimized

    The "MATCHED" and "NOT MATCHED" parts of a SQL MERGE statement are not optimized when criteria is based on constant or variable values, causing the statement to run for unnecessarily long periods of time and consume excess resources even though no action can actually be performed due to the criteria. This causes the merge statement to perform great degrees of additional work as is demonstrated in the attached SQL file.

    As a workaround for this, we have had to remove parts of the merge statement and perform them separately within IF blocks thereby negating the luster of the MERGE statement…

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

    We’ll send you updates on this idea

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

    Upvotes: 17

    <=-=Jan 19 2011 4:53PM=-=>

    Dear Josh,
    Thanks for taking time to post this suggestion.
    The problem you mentioned comes from the fact that when you run a stored procedure for the first time, the query optimizer builds a plan which does not take into account that variable.
    So, as a workaround I would suggest to add OPTION, it will ensure that the procedure is recompiled and so will force to use a new plan.
    However, your suggestion is very valuable and concerns not only the MERGE statement but all cached plans. We will look into this problem in the upcoming releases.
    Best regards,
    Jean-Sebastien, SQL Server

    <=-=Jan 25 2011 11:06AM=-=>

    Creating the procedures with “WITH RECOMPILE” did not change the performance of the procedure. The MERGE statement still seems to scan the data unnecessarily.

    We have created a separate merge statement within each of the…

  19. SSRS: Moving a rectangle by changing the Location Property needlessly changes child coordinates

    Tiny quirk (SQL 2008 R2 SP1 CU3):

    In a Report Design with a rectangle (probably other containers as well) containing one or more child controls, moving the rectangle using the mouse or arrow keys leaves the contents intact.

    Moving the rectangle by changing the location property, however, manipulates all child coordinates in such a way that thes remain stationary relative to the body, which very likely hides them completely. If there is a conscious decision behind this feature, I'd vote to reconsider, to simplify, and to have movement by property typing behave consistently with movement by mouse.

    Curiously, this way,…

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

    We’ll send you updates on this idea

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

    Upvotes: 21

    <=-=Feb 14 2012 2:56PM=-=>

    I’m certain that this has changed since SSRS 2005. It has destroyed my method of moving my rectangles around while keeping the contents intact.

    <=-=Apr 11 2012 2:40PM=-=>

    Moving a rectangle or other element with the mouse keeps the relative position of child elements intact. It should be the same with using the location property. Quite often, I need to modify the location property to get precise alignments.

    <=-=Mar 15 2013 3:15AM=-=>

    Still present in 2008R2, within VS2010.

    <=-=Oct 15 2013 2:38AM=-=>

    Behavior is still present in SQL Server 2012.

    <=-=Jan 10 2014 1:33PM=-=>

    This bug is extremely irritating when working with complex reports which use rectangles to contain groupings of tablixes, as changing one rectangle seems to somehow affect other rectangles child objects.

    <=-=Jul 13 2016 9:35AM=-=>

    Still an issue in SQL Server 2014…

  20. DCR - Attach database with NORECOVERY

    might be a small one, but a very important one at least for me... Consider you want to move a database that is on a SAN to a different machine, or even move a file to a different disk. The way to do it (or at least one way...) would be to detach and attach. Easy... Unless... you want to do this on a mirror or a Logship Destination...
    Why? Because sp_attach_db always recovers the DB, and for a mirror or logship destination you would need the DB back in NORECOVERY mode.
    So I really need to see a way…

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

    We’ll send you updates on this idea

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

    Upvotes: 20

    <=-=Sep 27 2010 9:57AM=-=>

    Greetings.
    Thanks for your suggestion. This is on my list of enhancements which I’d like to get into the product.
    We will continue tracking this request and hope to get it in as time and resources permit.

    Kevin Farlee
    SQL Server Storage Engine PM

← Previous 1 3 4 5 79 80
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base