Questions tagged [sql-server-2019]

Use this tag for questions specific to the 2019 version of Microsoft's SQL Server.

New Features Of SQL Server 2019

  1. Intelligent Query Processing Enhancements enter image description here
  2. Accelerated Database Recovery (ADR) enter image description here
  3. AlwaysEncrypted With Secure Enclaves enter image description here
  4. Memory-Optimized Tempdb Metadata
  5. Query Store Custom Capture Policies
  6. Verbose Truncation Warnings
  7. Resumable Index Build
  8. Data Virtualization With Polybase enter image description here
  9. Last Actual Execution Plan DMF
  10. Multiple Internal Performance Improvements

Reference : What's new in SQL Server 2019 (15.x)

977 questions
27
votes
7 answers

Restore database in docker container

Getting an error below when restoring a AdventureWorks2017 database within a docker container. Running SQL Server 2019 CTP 2.0 (mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu) Both backup and target data volume are persisted. No problems…
Daniel N
  • 1,122
  • 1
  • 8
  • 14
10
votes
2 answers

Unable to connect to (localdb)\MSSQLLocalDB - Due to trigger execution

I have a SQL Server Express instance on my machine that had been working fine and I have no idea what changed. I get this error now: Logon failed for login 'myusername' due to trigger execution. Changed database context to 'master'. I have tried…
8
votes
3 answers

SQL Server 2019 - The server principal "sa" is not able to access the database "DB_NAME" under the current security context

I've written the following stored procedure: CREATE PROCEDURE dbo.usp_DEMO @LOGINSQL VARCHAR(30), @DBNAME VARCHAR(40) WITH EXECUTE AS owner AS DECLARE @SQL NVARCHAR(1000) SET @SQL = 'USE' SET @SQL = @SQL + ' ' + @DBNAME + '…
AdemirP
  • 113
  • 1
  • 3
  • 10
7
votes
2 answers

Get Orders status that can be delivered with reducing quantity from stock without curson or While loop

Just like any retail business we have an Orders table and an Inventory table. What I am trying to do is to check Orders for which we have enough stock available to dispatch. A few things I need to consider: If all the items in an order are…
Jack Jones
  • 335
  • 1
  • 2
  • 8
7
votes
2 answers

Quiet (unattended) install of SQL Server Express LocalDb 2019

With SQL Server Express LocalDb 2012 (Microsoft MSI download) it was possible to do an unattended install from a command line: msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES This works pretty stable for me on various versions of…
msporek
  • 1,187
  • 8
  • 21
7
votes
2 answers

Unexpected @@rowcount behavior inside an UDF in MS SQL 2019

here's my sample code drop function rowcount_test go CREATE FUNCTION dbo.rowcount_test () RETURNS INT AS BEGIN DECLARE @v INT SELECT @v = 1 return @@ROWCOUNT END GO grant exec on dbo.rowcount_test to public go SELECT…
7
votes
1 answer

SQL Server 2019 Behavior change with scope of SET IDENTITY_INSERT ON/OFF

We are migrating to SQL Server 2019 RTM version and noticed that one of our stored procedures that uses SET IDENTITY_INSERT ON/OFF statements are failing which works properly in SQL Server 2017 and earlier. Even changing the compatibility level to…
Gan
  • 111
  • 6
6
votes
4 answers

SQL Server 2019 installation Windows 11 "Wait on the Database Engine recovery handle failed" Error

I can't install SQL Server 2019 on my Windows 11 machine, because it fails to start Database Engine Services and I do not understand why. This is my personal computer and I have full access and all permissions to it. I know this error is posted all…
6
votes
2 answers

MS SQL Server Docker data location

I am using the mcr.microsoft.com/mssql/server:2019-latest container and want to mount its data directory so that data does not get lost if the server goes down. Where inside is the data directory located? The documentation does not mention this at…
Werner Raath
  • 1,322
  • 3
  • 16
  • 34
6
votes
1 answer

SQL Server machine learning services r version 3.5

According to this link, SQL Server machine learning service's highest R version is 3.3. Does anyone know when one can upgrade to version 3.5 or later? Or is my only option to switch to sql server 2019? Thanks.
cs0815
  • 16,751
  • 45
  • 136
  • 299
5
votes
1 answer

How can I write a case sensitive WHERE CLAUSE in SQL Server?

Ok, this one has me stumped. I'm hoping it's not something stupid/obvious... I'm trying to fix addresses in a client database. I have a function that takes a string and returns a string where the first letter of every word is capitalized. I am…
Dizzy49
  • 1,360
  • 24
  • 35
5
votes
1 answer

SQL Query to get the count of Json Array

I have the below Json object. How do I get the count of Object Array. { "Model": [ { "ModelName": "Test Model", "Object": [ { "ID": 1, "Name": "ABC" }, { "ID": 11, "Name": "ABCD" …
Ashok Yaganti
  • 173
  • 5
  • 14
5
votes
1 answer

SQL Server Import Wizard doesn't support importing from excel sheet with more than 255 columns

I use the SQL Server 2019 Import and Export wizard to import an Excel sheet (xlsx file) as source and I set the destination as a SQL Server table. In the wizard setup I setup the mapping for all the columns in Excel to the SQL Server table. After…
choba78
  • 361
  • 3
  • 5
  • 13
4
votes
1 answer

Visual Studio 2022 can connect to localdb but SSMS 18.10 can't

Spanking brand-new installations of: Visual Studio 2022 Community (VS) SQL Server 2019 Dev (SQL) SQL Server Management Studio v18.10 (SSMS) There are no other Visual Studio or SQL Server instances or installations. A console program creates a…
David Rogers
  • 83
  • 2
  • 6
4
votes
1 answer

SQL Server named instance in Docker

How can I run a named SQL Server instance inside a Docker container? I have an application that has a connection string pointing to a named SQL Server instance, something like Data Source=HostName\InstanceName; this connection string is very…
Jordi
  • 2,055
  • 1
  • 16
  • 34
1
2 3
64 65