SQL Server

Microsoft SQL Server 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 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 Microsoft Q&A or Stack Overflow

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Power BI Report Server (Oct 2020) changes "changed by" date before modification

    Given a Power BI dashboard on Power BI Report Server with a direct query connection to an analysis service cube. Each invokement of manage in the browser leads to a change in the "changed by" date just before any modification takes place.
    This does not happen with import queries.

    12 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 →
  2. (SQL Server 2019) Session crashes for stored procedures using external temp tables

    When using stored procedures that access a temporary table created outside of the stored procedure I sometimes get a session crash with:
    'Exception 0xc0000005 EXCEPTIONACCESSVIOLATION reading address 0000000000000008 at 0x00007FF884E9E1B3'

    I managed to narrow it down to the following steps to recreate the issue.

    Step 1: Create or recreate the following stored procedure

    DROP PROCEDURE if exists Bug_POC
    GO

    CREATE PROCEDURE [dbo].BugPOC AS
    CREATE INDEX IX
    TMP
    ON #TempTable (id)

    select a.Id
    from [sysobjects] as a -- Could be any table
    inner join #TempTable as t on a.id = t.Id
    GO

    Step 2: Create/Recreate a temp table…

    12 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 →
  3. SQL Server still crashes when trying to use a query that uses ODBC with table-valued parameters.

    SQL server crashes when trying to use a query that uses ODBC with table-valued parameters.

    Simple query that uses a TVP parameter - causes EXCEPTIONACCESSVIOLATION in sqlserver.exe on both SQL Server 2017/2019, RTM or latest CUs, on Windows 10 and Windows Server 2016, on physical and virtualized hardware. This is almost the same issue I had reported many years ago (~July 2015) against SQL Server 2012/2014 (Microsoft support incident "[REG:115070212906012] SQL server crashes when trying to use a query that uses ODBC with table-valued parameters.").

    SELECT c.f3,0,case right(c.f6 , 1) when '/' then left(c.f6 , len( c.f6 )…

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

    We’ll send you updates on this idea

    4 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  4. Parallel SELECT INTO from sys.messages causes intra-query deadlock

    Loading data into a new table from sys.messages using parallel SELECT INTO causes consistent self-deadlocks. Testing on a machine with default parallelism settings and 4 logical cores. This occurs in SQL Server 2014, 2016 and 2017. Here's a reproduction:

    BEGIN TRANSACTION;
    
    

    SELECT TOP 10000
    m.message_id, m.[text]
    INTO SomeNewTable
    FROM sys.messages m

    For some reason, removing the "BEGIN TRANSACTION" reduces the frequency of deadlocks caused by this query. I've attached a deadlock graph from the issue.

    It's possible that bulk loading from sources like sys.messages is simply not a supported scenario - but, if so, this should be documented (or potentially…

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

    We’ll send you updates on this idea

    under review  ·  3 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  5. Support Trace Flag 834 with Columnstore

    Trace flag 834 has been marked as unsupported with columnstore by Microsoft since SQL Server 2012, but that trace flag resolves columnstore and batch mode related bottlenecks with the RESERVEDMEMORYALLOCATION_EXT wait when running workloads at high concurrency. In addition, vendors use TF 834 with columnstore when competing in the TPC-H benchmarks.

    Please support TF 834 with columnstore.

    References with reproducible workloads:

    https://orderbyselectnull.com/2018/03/06/large-cci-etls-cannot-scale-without-tf-834/

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

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  6. Merge statement Delete does not update indexed view in all cases

    A merge statement that contains both an update clause and a delete clause, does not always update indexed views that refer the table.

    Specifically, if the delete clause is the one that is triggered, and the update clause does not update any of the columns that are used by the indexed view, the deleted row is not removed from the indexed view.

    The indexed view is therefore logically inconsistent; it contains rows that are no longer part of the source table. An SQL script that demonstrates the bug is included.

    I have replicated the bug both on SQL Server 2014…

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

    We’ll send you updates on this idea

    under review  ·  1 comment  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  7. SSRS report builder not working after applying SQL update

    I have noticed that I can no longer use the “Report Builder” functionality in SSRS (while opening it from Report manager URL) after patching SQL Server 2012 Sp4 with recent CU KB4057116.

    Window Server 2008 R2 Standard
    SQL Server 2012 SP4 (11.0.7001.0)
    Getting below error after installing KB 4057116

    https://support.microsoft.com/en-us/help/4057116

    Following errors were detected during this operation.

    * [26/02/2018 10:15:22] System.Deployment.Application.InvalidDeploymentException (HashValidation)
    
    - File, interop.shdocvw.dll, has a different computed hash than specified in manifest.
    - Source: System.Deployment

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

    We’ll send you updates on this idea

    under review  ·  8 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  8. Incorrect Semi Join Cardinality Estimation

    Both "old" and "new" cardinality estimators produce an incorrect estimate for an apply semi join with predicates pushed below a union all on the inner side.

    The incorrect estimate is a fixed 100% of the input cardinality for the 120 model CE, and 90% for the 70 model.

    Full details at http://sqlperformance.com/2014/07/sql-plan/subquery-cardinality-estimation-bug

    12 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 →
  9. Deploying single SSIS package to SQL 2016 from SSDT 17.0-17.4

    Deploying a single SSIS package with VB script task, targeted for SQL 2016 from SSDT 17.0-17.4 causes the script tasks to not execute but the package deploys and executes reporting success. .

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

    We’ll send you updates on this idea

    5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  10. Cannot open Extended Event when default database not master

    You might get an error message when looking at Extended Event data (file, etc) if Object Explorer isn't connected to the master database.

    12 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 →
  11. "parameter name already exists" while trying to Process Database on Azure Analysis Services in SSMS

    If I try to Process Database in SQL Management Studio on either of my computers, I get the error:

    "parameter name already exists",
    "Parameter name: name (Microsoft.AnalysisServices.BackEnd).

    It seems to be an error returning from the AAS server itself (it happens in SSMS 2017 version 17.3 two different PCs (Windows 8.1 and Windows 10 1703)).

    Oddly, I can still successfully process the database if I run the refresh XMLA script above in SQL Management Studio or if I choose to process default or full under "Processing Option" in SSDT.

    I have tried deleting the database and redeploying, I have tried…

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

    We’ll send you updates on this idea

    6 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  12. SSMS 18.4 left and right arrow keys don't work in criteria pane

    When focused in a box in the criteria pane, the left and right arrow keys don't work. They have worked in previous iterations and up and down arrows still work.

    11 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 →
  13. SQL Server 2019 RC1 - Secure Enclaves Bug

    When trying to configure Secure Enclaves within 2019 - Allow enclave computations is not an option for us.

    This was apparently resolved in CPT 3.1 however we are still experiencing this issue.

    11 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 →
  14. ssms 18 Recent Files list too narrow

    Compared to SSMS v17.x, the MRU for recently opened files is too narrow. The filenames have been condensed with an ellipsis in the middle of the file name so for lists with similar filenames it becomes impossible to tell them apart. This worked better in SSMS v17.x. Why was it changed to become less useful in v18?

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

    We’ll send you updates on this idea

    5 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  15. Specified sample rate is not followed when statistics object is created on an empty table

    A statistics update "WITH RESAMPLE" does not respect specified sample rate if the statistics object was created on an empty table. This behavior is best understood with an example (see the attached script).

    This bug is a bit annoying because it requires the user to take a specific order of operations with their table creation, data population, and stats population to get around it. The workaround we currently have is to just insert a row with default values of each data type, create stats with the desired sample rate, and then delete that row.

    x

    11 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. Azure SQL can't upgrade data-tier application

    Using DacFx 17.4.1 / SSMS 17.8.1, it is not possible to deploy and then upgrade an Azure SQL Server Database as a data-tier application.

    The initial deployment works correctly, but attempting to upgrade using SSMS or sqlpackage (using /p:BlockWhenDriftDetected=true /p:RegisterDataTierApplication=True) results in the following error:

    Databases registered as a DAC database must be hosted by an instance of SQL 2005 SP4, SQL 2008 SP2, SQL 2008 R2, SQL 2012, SQL 2014 or Microsoft Azure SQL Database.
    Unable to proceed with DAC operations on the target instance because it does not support DACs. Specify another instance, or upgrade to a version…

    11 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 →
  17. VS2017 and SSDT publishing Graph Database objects created before schemas

    VS 15.7.4
    SSDT 15.1.61804.210

    We created a new SQL Server Database Project in VS2017 and imported a database that uses Graph DB features.

    Trying to publish the project we receive and error indicating one schema is missing (a custom schema that contains graph database objects).
    We dug into publish t-sql script and we found that CREATE TABLE statements for graph db edge tables were placed before CREATE SCHEMA statements, therefore, publish won’t ever complete successfully.

    To complete deploy we had to move CREATE SCHEMA statements above and run the script manually.

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

    We’ll send you updates on this idea

    under review  ·  2 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  18. smo script bug cannot drop table #sver

    I tried to script using SMO via following powershell script

    $conn = new-object system.data.sqlclient.sqlconnection
    $conn.connectionstring = "data source=(local);initial catalog=nxdba;integrated security=sspi;"
    $conn.open();

    ## SMO 사용
    $srv = New-Object "Microsoft.SqlServer.Management.Smo.Server"
    $so = New-Object "Microsoft.SqlServer.Management.Smo.ScriptingOptions"
    $so.AgentJobId=$true;
    $so.ScriptBatchTerminator=$true;
    $so.ToFileOnly=$true;
    $so.FileName="D:\Dba\Job.sql"

        ## Job Scheduler 백업
    
    $srv.JobServer.Jobs |
    foreach {
    if (($_.Name -notlike '*NXDBA*') -and ($_.Name -ne 'syspolicy_purge_history')){
    $_.Script($so);
    }
    }

    and above powershell turns into following t-sql script and causing error "cannot drop the table #sver"

    here is extended event result

    <RingBufferTarget truncated="0" processingTime="0" totalEventsProcessed="1" eventCount="1" droppedCount="0" memoryUsed="5191">
    <event name="error_reported" package="sqlserver" timestamp="2018-06-08T07:19:58.924Z">

    &lt;data name=&quot;error_number&quot;&gt;
    
    &lt;type name=&quot;int32&quot; package=&quot;package0&quot;&gt;&lt;/type&gt;
    &lt;value&gt;3701&lt;/value&gt;
    &lt;/data&gt;
    &lt;data name=&quot;severity&quot;&gt;
    &lt;type name=&quot;int32&quot; package=&quot;package0&quot;&gt;&lt;/type&gt;
    &lt;value&gt;11&lt;/value&gt;
    11 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 →
  19. The "Number of Rows Read" property is incorrect when the Predicate property contains a PROBE

    Scan and Seek operators in newer versions of SQL Server report a property "Number of Rows Read" in the actual execution plan which is incredibly usesful when troubleshooting slow queries. However, it reports a misleading number of the execution plan contains a Bitmap operator and the bitmap is probed as part of the Predicate of the scan operator.

    This can be demonstrated in ContosoRetailsDW with the queries below:

    SELECT ds.StoreManager,

           dp.BrandName,
    
    SUM(fos.TotalCost)

    FROM dbo.FactOnlineSales AS fos
    INNER JOIN dbo.DimStore AS ds

      ON   ds.StoreKey = fos.StoreKey
    

    INNER JOIN dbo.DimProduct AS dp

      ON   dp.ProductKey = fos.ProductKey
    

    WHERE ds.EmployeeCount < 30
    AND dp.ColorName…

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

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  20. Computed column matching bug with ISNULL on BIT type

    A computed column with bit data type and outermost ISNULL is expanded but not matched back, preventing index matching.

    Workarounds:


    1. Ensure the computed column is not typed as bit; or

    2. Do not use an outermost ISNULL (column marked nullable); or

    3. Persist the computed column and enable trace flag 174.

    Demo:

    -- Uses index
    DROP TABLE IF EXISTS dbo.Example1;

    CREATE TABLE dbo.Example1
    (

    a1 bit NOT NULL,
    
    a2 bit NOT NULL,
    d AS a1 | a2,

    INDEX i (d)

    );

    SELECT COUNT_BIG(*)
    FROM dbo.Example1 AS E
    WHERE E.d = CONVERT(bit, 'true');

    -- Does not use index
    DROP TABLE IF EXISTS dbo.Example2;

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

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  Bugs  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base