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. Why does Find and Replace in SSMS 18.2 default to "All Open Documents"?!

    Why on earth does Find and Replace default to "All Open Documents"?!

    You don't know how many times I have replaced things in other query windows unintentionally. If I am fortunate, I catch it and do Ctrl-Z to undo it.

    Just now I did a replace, and SSMS froze while it happily did a replace in all the query windows I had open , to the tune of 63,514 replacements!

    A much more sensible default would be "Current Document". Or better yet, allow the default to be set under Tools... Options...

    Please change this.

    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 →
  2. Query window orphaned on database deletion SSMS 18.3

    In SSMS 18.3, if you are working with a query and you delete the database which interrupts the connection, you can no longer connect that query window to a different database.

    When I restored a test version of my database that had the data in it I needed, I went to my query window and could not switch the connection. Everything was grayed out. I had to copy my code to a new window and run it in a new window that was connected to the proper database.

    Ideally, the connection icons should not be grayed out so that I…

    1 vote
    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 →
  3. SSMS 18.1 Crashing, usually when Job Activity Monitor is open

    SSMS Crashing, usually when Job Activity Monitor is open.

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: Ssms.exe
    Problem Signature 02: 2015.130.16000.28
    Problem Signature 03: 580af2c5
    Problem Signature 04: System.Drawing
    Problem Signature 05: 4.7.3394.0
    Problem Signature 06: 5c53726a
    Problem Signature 07: 33a
    Problem Signature 08: 0
    Problem Signature 09: System.InvalidOperationException
    OS Version: 6.3.9600.2.0.0.272.7
    Locale ID: 1033
    Additional Information 1: 8858
    Additional Information 2: 8858cc1e35f264ce372894c8159c6b64
    Additional Information 3: 030a
    Additional Information 4: 030af309b1614cc85507958aa0979deb

    Read our privacy statement online:
    http://go.microsoft.com/fwlink/?linkid=280262

    If the online privacy statement is not available, please read our privacy statement offline:
    C:\Windows\system32\en-US\erofflps.txt

    1 vote
    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 →
  4. data migration assistant crashes

    If I have a table definition with the following T-SQL definition, and try to run the Data migration assistant against the datbase, it crashes with an error which says The file contains the XML node type {0}. This type is unsupported or in an unsupported location
    CREATE TABLE [dbo].[Table1]
    (
    [Id] INT NOT NULL PRIMARY KEY,
    TEST INT null
    )
    go
    CREATE TRIGGER [dbo].[TRIGGER_TEST] ON [dbo].[Table1] AFTER UPDATE AS
    update Table1 set test = 42
    go
    EXECUTE sp_settriggerorder @triggername= 'TRIGGER_TEST', @order= 'Last', @stmttype = 'UPDATE'

    1 vote
    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. When I try to add a table to the view designer, I get "Index was outside the bounds of the array."

    This error occurs and I can't add any tables to my view; I have to create the view manually, using SQL statements.

    1 vote
    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 →
  6. Improve connection speed

    With SSMS 17+ (tested on all versions to 18.3), connecting to SQL Server takes about 30 seconds. Every time you open a new query tab, expand a database + or right-click on a database table, it re-connects and takes about 30 seconds. This was about 1 second or less with the previous versions of SSMS. This might have to do with some properties of the network like being able to access certificate revocation lists.

    However, it appears like there is no connection pooling in use or some time out that is occurring for each connection. When writing .NET code to…

    1 vote
    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. Bug in sys.dm_db_persisted_sku_features: does not honor read uncommitted, causes blocking

    This DMV doesn't honor NOLOCK or READ UNCOMMITTED hints, so it causes blocking.

    To reproduce it, run this in one session:
    CREATE TABLE dbo.Test (Id INT);
    GO
    BEGIN TRAN
    CREATE CLUSTERED COLUMNSTORE INDEX CCI ON dbo.Test;
    GO

    Then in another session, in the same database, run:
    SELECT * FROM sys.dm_db_persisted_sku_features WITH (NOLOCK);

    It gets blocked, which shouldn't happen - other DMVs don't perform this way.

    1 vote
    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 →
  8. Availability Group DMVs consume too much memory.

    This query joins to three Availability Group DMVs
    ```
    SELECT name, ISNULL(SERVERPROPERTY('MachineName'), 'NA') AS [server]
    FROM sys.databases
    WHERE database_id <> 2
    AND name NOT LIKE '%temp[_]%'
    AND recovery_model_desc = 'FULL'
    AND state_desc = 'ONLINE'
    AND name not in ('')
    AND name in (
    select DISTINCT ADC.database_name
    from sys.availability_databases_cluster ADC
    inner join sys.dm_hadr_availability_replica_states HARS on ADC.group_id = HARS.group_id
    where is_local = 'TRUE'
    and HARS.role_desc = 'PRIMARY'
    UNION
    select DISTINCT name
    from master.sys.databases
    where name not in (
    select database_name
    from sys.availability_databases_cluster ADC))
    ORDER BY 1 DESC
    ```
    When I run it on my server with 120 databases and 11 different availability…

    2 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 →
  9. BCP to ignore different columns order in format file and target database

    One of declared reason of using format file is "The column order is different for the data file and table.". But it still doesn't work this way. I have differences in column order, because second database being patched with dacpac diffs (with first database) with option "ignore column order" to prevent table recreation. Everything else absolutely the same between tables.
    I write:
    bcp DB2.dbo.Table1 in C:\Temp\dbo_Table1.bcp -CRAW -q -E -k -h "TABLOCK" -fC:\Temp\dbo_Table1.fmt -t"|~~|" -r\r\r\n\n -S"Server1" -T
    and I get:
    SQLState = S1002
    NativeError = 0
    Error = [Microsoft][ODBC Driver 11 for SQL Server]Invalid Descriptor Index

    It works only if…

    1 vote
    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 →
  10. CREATE FUNCTION silently fails in certain circumstances

    Microsoft SQL Server 2016 (SP2-CU7-GDR) (KB4505222) - 13.0.5366.0 (X64)
    Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor)

    Problem: When executing a CREATE FUNCTION or ALTER FUNCTION that tries to pass variable content to XML methods (e.g. 'modify'), the CREATE/ALTER statement silently fails IF the dynamic content in question involves a sibquery. It does not create or alter the function, but it displays "Command complete successfully.

    If the dynamic content is a simple concatenation without subqueries, an error message is correctly generated.

    Example:

    create function dbo.DoSomethingWithXml (@document xml)
    returns xml
    as
    begin

    set @document.modify(N'insert <?xml-stylesheet…

    1 vote
    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 →
  11. SSIS - Unable to load data using Excel Source

    I'm trying to load data into my Database starting from several Excel Files.
    So, I'm using Excel Source (SSIS component) but, after created the Excel connection manager, I receive the following error (displayed in Error1 and Error2 attachment files):

    "No tables or views could be loaded"
    "Could not retrive the table information for the connection manager 'CodesSubclass'. Object reference not set to an instance of an object".

    I have already installed Microsoft Access Database Engine 2016 Redistributable and forced my SSIS
    solution in order to run in 32 bit-mode (Run64BitRuntime = false).
    This one is a connection string sample used…

    2 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 →
  12. Re-raised error from INSERT-EXEC over lnked server causes "A sever error occurred on the current command"

    You run INSERT-EXEC with the source coming from a linked server. There is an error in the insert part, for instance column mismatch or string truncation. You trap the error in TRY-CATCH and re-raise it with ;THROW. SSMS now reports
    Msg 0, Level 11, State 0, Line 77
    A severe error occurred on the current command. The results, if any, should be discarded.
    If you run the same operation in SQLCMD, you may see nothing at all. There is nothing in the SQL Server eror log, and the fact that severity is 11, indicates an error in SqlClient. Supposedly, SQL…

    1 vote
    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 →
  13. Unable to import bacpac with temporal tables and cascading constraints

    Exporting existing database and trying to import the bacpac file fails with error:
    Could not import package.
    Warning SQL72012: The object [dev-xamplo-aspecx-db_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
    Warning SQL72012: The object [dev-xamplo-aspecx-db_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
    Error SQL72014: .Net…

    1 vote
    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 →
  14. Missing data when importing Data-tier-Application

    When I Export a data tier application from azure and import it to a local server it gives me some indexes error caused by missing data. This issues does not happens every time I export it only some times.

    Could not import package.
    Warning SQL72012: The object [ActiveRadar_EAP_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
    Warning SQL72012: The object [ActiveRadar_EAP_Log] exists in the target, but it will not be dropped even though…

    1 vote
    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 →
  15. SSMS Tools > Check for Updates doesn't fine new version

    I'm using SSMS v18.1, and I have the option to automatically check for updates. Even still, if I manually select Tools > Check for Updates, it dutifully tells me that I am on the latest version.

    But a simple web search reveals that v18.2 was released about three weeks ago.

    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 →
  16. SSMS hard crashes on drag and drop

    I'm using SSMS v18.1. When I drag and drop an item, like a table or view, from the Object Explorer onto a query window, for something as simple as "select * from " <dropped item>, I get a hard crash. The error messages says, "An exception has been encountered. This may be caused by and extension. You can get more information by examining the file 'C:\Users\<username>\AppData\Roaming\Microsoft\AppEnv\15.0\ActivityLog.xml'."

    1 vote
    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. ssdt linux defaultdatapath

    When using SSDT to publish against SQL Server running on Linux $defaultDataPath and $DefaultLogPath builtin variable are always empty, which results in an error (see below) when attempting to create a database with additional data files. because of invalid filepath.

    Additional File Definition in db project:
    ALTER DATABASE [$(DatabaseName)]
    ADD FILE
    (
    NAME = [FooName],
    FILENAME = '$(DefaultDataPath)$(DefaultFilePrefix)_FooName.ndf',
    SIZE = 1024 MB,
    FILEGROWTH = 1024MB
    ) TO FILEGROUP [FooFileGroup]

    Msg 5105, Level 16, State 2, Line 14
    A file activation error occurred. The physical file name 'FG_Indexes.ndf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
    Msg…

    2 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 →
  18. Online index rebuilds for partitions failing or "breaking" the database (SQL 2017 CU16)

    Hi,

    We have a table partitioned across Read-Only and Read-Write file groups. When performing an online index rebuild of a partition on the Read-Write file group, SQL Server is throwing the following error.

    The operating system returned error 5(Access is denied.) to SQL Server during a write at offset 0x00000003f40000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Data\XXXXXX_Archive.ndf'. Additional messages in the SQL Server error log and operating system error log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can…

    2 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 →
  19. ISO 8601 date conversion failing for some dates when language = British

    Casting ISO 8601 date strings does not work for the date 9999-12-31 when the language is set to British. Other 8601 dates do work. SQL Server 2017.

    The following works:
    SET LANGUAGE us_english
    SELECT CAST('9999-12-31' AS DATETIME)
    SELECT CAST('9999-12-31 00:00:00.000' AS DATETIME)

    The following does not work:
    SET LANGUAGE British
    SELECT CAST('9999-12-31' AS DATETIME)
    SELECT CAST('9999-12-31 00:00:00.000' AS DATETIME)

    This returns error:
    Msg 242, Level 16, State 3, Line 6
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.

    2 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 →
  20. TLS 1.2 support for SQL Server 2014 SP3 CU4

    We are planning to upgrade our customers to SQL Server 2014 SP3 CU4 with TLS 1.2. As per MS documentation, TLS 1.2 is supported for SQL Server 2014 from SP1 CU5 onwards. Now when we verify with SP3 CU4, SSRS is not working but it is working with SP3 only. As per our understanding CUs are latest and including all the features implemented in the base SPs (SP3 with CU4). What surprise us is that the feature is supported in SP3 but not in SP3 CU4.

    Note: we opened a ticked with MS and received reply that TLS 1.2 is…

    1 vote
    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 →
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base