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 Stack Overflow or MSDN.


  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. 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 →
  2. bad plan for like queries on varchar columns with nvarchar patterns

    Given tables constructed like so

    CREATE TABLE [Table] (
    TableId BIGINT NOT NULL,
    StringId VARCHAR(400) NOT NULL,
    Data1 NVARCHAR(400) NOT NULL, -- ...
    PRIMARY KEY (TableId)
    );
    CREATE INDEX TableIndex ON ([Table].StringId);
    CREATE INDEX TableIndex ON ([Table].Data1);

    SQL queries of this form should be able to index scan a very narrow range but don't.

    SELECT * FROM [Table] WHERE StringId like @0 + N'%';

    In the production code, the SQL statement is generated and could have referred to any column in the table. I now have to write some really stupid code in the generator to deal with this. It's…

    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. Object reference not set to an instance of an object when I import a flat file

    The scenario is like this, I exported the data in CSV Format from the AzureStorage explorer, then imported in my local database.
    Note: The Azure storage explorer did not export anything in the file, I supose because of this it happened, but still I would expect some other error message something like: "Invalid input file: file empty" than such an exception
    I got the following exception:
    Object reference not set to an instance of an object when I import a flat file:
    at Microsoft.SqlServer.Prose.Import.BcpProcess.set_UseSimpleDataType(Boolean value)
    at Microsoft.SqlServer.Import.Wizard.PreviewPageController.OnActivate()
    at Microsoft.SqlServer.Management.TaskForms.SqlWizardPageController.OnFirstActivate()
    at Microsoft.SqlServer.Management.TaskForms.SqlWizardPageController.Microsoft.SqlServer.Management.TaskForms.ISqlWizardPageController.SetActive()
    at Microsoft.SqlServer.Management.TaskForms.ControllerPage.OnSetActive()
    at Microsoft.SqlServer.Management.SqlWizardFramework.WizardFramework.ActivatePage(NavigationItem item, NavigationDirection direction)
    at Microsoft.SqlServer.Management.SqlWizardFramework.WizardFramework.ActivatePage(Page…

    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. SQL Server 2019 (and earlier) gets into a deadlock situation if you use MARS with images

    I have tested this problem with SQL Server 15.0.2070.41 and ODBC Driver 17 for SQL Server version 2017.175.02.01. I have also tested with multiple other combinations of SQL Server and ODBC interfaces to SQL Server.

    The problem only occurs If you enable MARS support via SQLSetConnectAttr(SQLCOPTSSMARSENABLED, SQLMARSENABLED_YES).

    Given a table like:
    CREATE TABLE TestTable(

    id int NOT NULL,
    
    info char(10),
    picture varbinary(max)

    )

    You can use image instead of varbinary(max) and get the same problem.

    Prepare the select statement:
    SELECT id, info, picture FROM TestTable

    bind id and info to appropriate fields and execute…

    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. баг звука

    баг звука игры + telegram, team speak и тд
    Нужно каждый раз выключать и включать обратно.
    виндовс 10 версии 1909

    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. SSMS 18.5.1 does not import .dtsx with PowerQuery specified connections

    SSMS 18.5.1 does not import .dtsx with PowerQuery specified connections.

    The dtsx package contains a Power Query item; it runs perfectly within Visual Studio but I cannot deploy it to SSISDB from vs2019 (16.6.3) or import it into the SSIDB (SQL server 14.0.2027.2) Project using SSMS 18.5.1

    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. 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. DBCC CHECKDB/CHECKTABLE bug with EXTENDED_LOGICAL_CHECKS

    Intermittently CHECKDB/CHECKTABLE will return either the error when using EXTENDEDLOGICALCHECKS

    Msg 8907, Sev 16, State 1, Line 1 : The spatial index, XML index or indexed view '<redacted view name>' (object ID 541756223) contains rows that were not produced by the view definition. This does not necessarily represent an integrity issue with the data in this database.

    or

    Msg 8908, Sev 16, State 1, Line 1 : The spatial index, XML index or indexed view 'redacted view name' (object ID 557756280) does not contain all rows that the view definition produces. This does not necessarily represent an integrity…

    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 →
  9. SQL Server 2019 scalar functions fail incorrectly if they have a CHECKSUM

    Scalar functions with CHECKSUM(*) fail on compatibility level 150, SQL Server 2019 build 15.0.4043.16.

    ALTER DATABASE CURRENT SET COMPATIBILITY_LEVEL = 140;
    GO

    CREATE OR ALTER FUNCTION dbo.Test()
    RETURNS INT AS
    BEGIN

    DECLARE @i BIGINT;
    
    SELECT TOP 1 @i = CHECKSUM(*)
    FROM master.dbo.spt_values;
    RETURN 1;

    END
    GO
    SELECT dbo.Test(); / Works fine /

    ALTER DATABASE CURRENT SET COMPATIBILITY_LEVEL = 150;
    GO

    SELECT dbo.Test();

    /* Gets error:

    Msg 1789, Level 16, State 1, Procedure Test, Line 6 [Batch Start Line 17]
    Cannot use CHECKSUM(*) in a computed column, constraint, default definition, or INSERT statement.

    */

    7 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 →
  10. Azure SQL Database Deployment task using DACPAC fails if deploying full-text catalog/index with /p:IncludeTransactionalScripts=False

    When using the "Azure SQL Database Deployment" task and deploying a DACPAC file that contains a full-text-index, and the deployment uses the /p:IncludeTransactionalScripts=True parameter, the deployment fails. I assume with this parameter the full-text catalog/index is created after everything else, which would explain the error. This SO question/answer mentions the same: https://stackoverflow.com/questions/48204621/deploy-a-dacpac-that-contains-a-fulltext-index-with-msdeploy

    The error I get is:

    Error SQL72014: .Net SqlClient Data Provider: Msg 7601, Level 16, State 2, Procedure <name of stored procedure>, Line 8 Cannot use a CONTAINS or FREETEXT predicate on table or indexed view '<name of table>' because it is not full-text indexed.
    Error SQL72045: Script…

    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. Sql Server management studio An internal error occurred. (mscorlib)

    When ever I try to open a query or select rows from a table i face the error below.

    An internal error occurred. Please contact Microsoft Support. (mscorlib)


    Program Location:

    at Microsoft.Assumes.Fail(String message, Boolean showAssert)
    at Microsoft.VisualStudio.Editor.Implementation.Common.GetComponentModelOnUIThread(IServiceProvider serviceProvider)
    at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite)
    at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.SetSite(Object serviceProvider)
    at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitTextBuffer(Object sp)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.Initialize(Object sp)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.Initialize(Object sp)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.Initialize(Object sp, String moniker)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result)
    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) …

    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 →
  12. Internal error "An unexpected error occurred (file ‘xmvsquert.cpp’ line 14408, function XMVSAliasVector::Bind "

    We are facing severe issues querying a tabular model under RLS

    Scenario:
    • On-prem SSAS 2017 CU20
    • Tabular model compatibility 1400
    • Pure star schema
    • RLS expressions to filter 5 dimension table
    • No RLS directly defined against fact tables
    • RLS uses a security table to lookup if the current user has access to a given row sing CONTAINS

    Issue:
    • Unexpected error randomly appears querying the model
    • The error is “An unexpected error occurred (file ‘xmvsquert.cpp’ line 14408, function XMVSAliasVector::Bind ”
    • The error appears while querying fact table even with simple COUNTROWS(<table>) if the…

    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 →
  13. Make it work

    SQL Server. It might be a good idea - to make it work. Currently; when installed - you can't connect. FW disabled; still cannot make a connection. Now .. why not; when I install SQL server; you know "SERVER" ... make the connection WORK. It is VERY annoying to have to research the error numbers; to find the 20 options that might fix YOUR problem - that I have to live with, and fix EVERY TIME I install SQL. Yes, this is a 'bug'; it doesn't work; and I have to disable (safety) features to get it working, as I'm…

    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. Shrink file via SSMS shows incorrect space used

    Shrink file via SSMS shows incorrect space used
    Currently using 18.5.1, connecting to 2019 Standard.
    For some database files, I consistently get 99% free space listed, which I know is not true. I think it might be related to the fact that some have compressed tables.

    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 Ctrl-F first press always opens Find In Files for a "SQL Query Editor" file, regardless of keyboard mapping

    If I open a SQL file in SSMS and press CTRL-F, the Find In Files dialog opens. If I close that and press CTRL-F again, the Quick Find window opens.

    I want CTRL-F to always open Quick Find. This works fine in SSMS for non-SQL file types. I've tried forcing the keyboard mapping for CTRL-F both on Global and SQL Query Editor and I can't fix this behaviour. It's been the same since at least SSMS 2016, and I just upgraded to 2018 but it's still there :-(

    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 →
  16. SSMS Query Results Grid: Widening First Column Shrinks Results by One row when Results contain 1 or 2 rows

    In many scenarios when multiple queries are executed, and one of the queries has results containing 2 or less rows, and first column text is wide enough that column is narrowed to show partial text with ellipses:
    When user double clicks column border to widen column, the grid reduces height by one row.

    So if there was only one row to start with that row is (mostly) collapsed.

    Expected behavior: Grid height does not change unless user specifically drags the bottom of grid to make taller or shorter.

    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 →
  17. ssms 18.5.1 Specify Values for Template Parameters... (CTRL-SHFT-M)

    ssms 18.5.1 Specify Values for Template Parameters... (CTRL-SHFT-M) stll does not place the cursor correctly when pressing CTRL-SHFT-M. As a frequent used feature, this is cause issue when an expected action does not occur and cause delays and issues with designed scripts.

    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 →
  18. Unresolved reference not being caught when joining temp tables (SQL71561)

    When building a SSDT SQL Server Database Project project in Visual Studio 2019,

    The error SQL71561 is expected to raise when there is an unresolved reference in the schema. This is not happening in situations like this:

    Given a table called Asset in the schema Asset:

    CREATE PROCEDURE [dbo].[GetMix] AS BEGIN
    SELECT a.Id

    INTO #OpenTrades

    FROM Asset.Asset a

    UPDATE ot

    SET ot.Id = pcf.VariableNotCheckedHere
    FROM #OpenTrades ot
    INNER JOIN Asset.Asset pcf

         ON    ot.FromCurrencyId = pcf.AlsoNotCheckedHere
    

    END
    the references VariableNotCheckedHere and AlsoNotCheckedHere do not belong to the Asset.Asset table. Therefore the SQL71561 should be raised

    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 →
  19. SSRS 2017 unable to connect after using double quotes in password

    SSRS shows error "Unable to connect to data source" for dataset when double quotes are used in password.

    Steps:
    1) Create SQL server account:

    USE [master]
    GO
    CREATE LOGIN [Reportxs] WITH PASSWORD=N'Rpt"123', DEFAULTDATABASE=[SomeDB], CHECKEXPIRATION=OFF, CHECKPOLICY=ON
    GO
    USE [SomeDB]
    GO
    CREATE USER [Reportxs] FOR LOGIN [Reportxs]
    GO
    USE [SomeDB]
    GO
    ALTER ROLE [dbdatareader] ADD MEMBER [Reportxs]
    GO

    2) Create new project Report Server project using Report Wizard
    3) Create new Datasource with SQL Server Authentication, Username = Report_xs and password =Test"123
    4) Tick "Save my password"
    5) Select your database
    6) Click on…

    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 →
  20. Reg temp table drop

    I have added one drop condition for #temptable inside the if condition in store procedure. But not create #temptable any where still it is allowed to alter store procedure .

    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 →
← Previous 1 3 4 5 266 267
  • Don't see your idea?

SQL Server

Categories

Feedback and Knowledge Base