Questions tagged [sql-server-2019]

SQL Server 2019 (major build version 15.00.xxxx). Please also tag sql-server.

1139 questions
33
votes
1 answer

SQL Server 2019 executes unreachable code

[Update: This question describes a bug which has been fixed in Cumulative Update 5 for SQL Server 2019.] Consider the following repro example (fiddle): CREATE FUNCTION dbo.Repro (@myYear int) RETURNS datetime AS BEGIN IF @myYear <> 1990 …
Heinzi
  • 3,210
  • 2
  • 32
  • 43
25
votes
2 answers

How do I download SQL Server 2019 developer edition?

I've been looking around the web on how to download SQL serer 2019 Developer edition. Currently, on the Microsoft site they only have the 2022 version, so I was wondering how one can download older versions. I stupidly did not get download the…
Mike
  • 251
  • 1
  • 3
  • 3
23
votes
1 answer

Implementation and contraindications for OPTIMIZE_FOR_SEQUENTIAL_KEY

SQL Server 2019 CTP3.1 introduced an optimization to address last-page insert contention. This takes the form of an index option called OPTIMIZE_FOR_SEQUENTIAL_KEY. One imagines this could be an adaptation of Bw-Tree or Bz-Tree. However, these rely…
Michael Green
  • 25,255
  • 13
  • 54
  • 100
20
votes
2 answers

SQL Server in-memory optmized tempdb metadata memory usage continually growing

Problem We have enabled sp_configure 'tempdb metadata memory-optimized' = 1, and now the tempdb meta data is taking over 400 GB on one of our servers and continues to grow. There are some drops in memory usage, but generally it keeps growing it's…
20
votes
2 answers

How do you enable SQL Server 2019's result set caching?

SQL Server 2019 CTP 2.3 added a few new columns to sys.databases, including is_result_set_caching_on: It's not documented yet in the What's New in SQL Server 2019, nor in the ALTER DATABASE page. I tried using the same syntax as Accelerated…
Brent Ozar
  • 43,325
  • 51
  • 233
  • 390
18
votes
3 answers

Where to download SQL Server 2019 Express LocalDB Installer MSI from

SQL Server 2019 is released but I there doesn't appear to be a LocalDB version available for download. Does anyone know if there will be a LocalDB release or if 2017 is the last version?
Simon
  • 283
  • 1
  • 2
  • 6
17
votes
1 answer

Union does not always eliminate duplicates

I have the following query and expect that as a result I will have a list of IDs without duplicates. But sometimes it produces duplicates (1-2 on 4 million rows). Why can it happen? I run it with the default (read committed) isolation level. I can't…
16
votes
1 answer

Does SQL Server 2019 have task scheduling differences between enterprise and standard editions?

In How It Works: SQL Server 2012 Database Engine Task Scheduling, Bob Dorr explains some of the changes for worker scheduler assignment in SQL Server 2012. He mentions that some of the improvements are only available in enterprise edition. Do these…
Joe Obbish
  • 32,976
  • 4
  • 74
  • 153
16
votes
1 answer

What is AzureAttestService?

We started the installation and configuration of SQL Server 2019 on Windows 2019 and noticed after install a new service named 'AzureAttestService' was running and set to automatic. Services list the Description and Group field also as…
SQLDBAND
  • 355
  • 1
  • 3
  • 6
15
votes
1 answer

Clone a database from SQL Server 2019 to 2017

I try to clone a database from an Sql Server on my local machine v15 (2019) to a server machine v14(2017). I did a .bak file and when I tried to import on the server side it says: System.Data.SqlClient.SqlError: The database was backed up on a…
serge
  • 451
  • 1
  • 3
  • 10
13
votes
7 answers

Improve The Performance Of Multiple Date Range Predicates

let's say You have a stored procedure that accepts arrays of datetimes, which are loaded into a temp table, and used to filter on a datetime column in a table. There can be any number of values inserted as begin and end dates. Date ranges may…
Erik Reasonable Rates Darling
  • 45,549
  • 14
  • 145
  • 532
12
votes
1 answer

Is there a reliable way to check if a trigger being fired was the result of a DML action from another *specific* trigger?

Is there any way to tell from within a trigger, when it gets fired, that it is being fired as the result of a DML action that occurred within another specific trigger? Any chance any information about the call stack is exposed in the EVENTDATA()…
J.D.
  • 40,776
  • 12
  • 62
  • 141
12
votes
2 answers

Unable to execute query and not even able to generate Estimated execution plan

I am working on SQL Server 2019. I have a table dbo.AllDates where I have all dates from 1990 to 2050. I have another table dbo.ActualExchangeRates where I have actual exchange rates for certain currencies on the dates when exchange rate is found in…
12
votes
1 answer

Why is a parallel top N sort apparently much more CPU efficient than a serial top N sort?

I'm testing against SQL Server 2019 CU14. I have a pure row-mode query that selects the top 50 rows from a complicated view. The full query takes 25426 ms of CPU time at MAXDOP 1 and 19068 ms of CPU time at MAXDOP 2. I'm not surprised that the…
Joe Obbish
  • 32,976
  • 4
  • 74
  • 153
12
votes
1 answer

SQL Server 2019: Memory performance with graph queries (possible memory leak)

I'm currently working on implementing an upgrade to SQL Server 2019 in order to make use of the graph features that are available in it. Our database stores records of files and their children, and the graph features allow us to quickly find all of…
1
2 3
75 76