Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

KB5023049 - Cumulative Update 19 for SQL Server 2019

Release Date:   February 16, 2023
Version:   15.0.4298.1

Summary

This article describes Cumulative Update package 19 (CU19) for Microsoft SQL Server 2019. This update contains 47 fixes that were issued after the release of SQL Server 2019 Cumulative Update 18, and it updates components in the following builds:

  • SQL Server - Product version: 15.0.4298.1, file version: 2019.150.4298.1
  • Analysis Services - Product version: 15.0.35.35, file version: 2018.150.35.35

Note

This cumulative update includes Security Update 5021125. For more information, see KB5021125 - Description of the security update for SQL Server 2019 GDR: February 14, 2023.

Known issues in this update

Issue one

Queries that use the built-in SESSION_CONTEXT function might return incorrect results or trigger access violation (AV) dump files when run in parallel query plans. This issue occurs because of the manner in which SESSION_CONTEXT interacts with parallel execution threads, particularly if the session is reset for reuse.

For more information, see the Known issues section in SESSION_CONTEXT.

Issue two

After you install this cumulative update, external data sources using the generic ODBC connector may no longer work. When you try to query external tables that were created before installing this cumulative update, you receive the following error message:

Msg 7320, Level 16, State 110, Line 68
Cannot execute the query "Remote Query" against OLE DB provider "MSOLEDBSQL" for linked server "(null)". Object reference not set to an instance of an object.

If you try to create a new external table, you receive the following error message:

Msg 110813, Level 16, State 1, Line 64
Object reference not set to an instance of an object.

To work around this issue, you can uninstall this cumulative update or add the Driver keyword to the CONNECTION_OPTIONS argument. For more information, see Generic ODBC external data sources may not work after installing Cumulative Update.

This issue is fixed in SQL Server 2019 CU21.

Improvements and fixes included in this update

A downloadable Excel workbook that contains a summary list of builds, together with their current support lifecycle, is available. The Excel file also contains detailed fix lists for SQL Server 2022, SQL Server 2019, and SQL Server 2017. Select to download this Excel file now.

Note

Individual entries in the following table can be referenced directly through a bookmark. If you select any bug reference ID in the table, a bookmark tag is added to the URL by using the "#NNNNNNN" format. You can then share this URL with others so that they can jump directly to the desired fix in the table.

For more information about the bugs that are fixed and enhancements that are included in this cumulative update, see the following Microsoft Knowledge Base articles.

Bug reference Description Fix area Component Platform
2086067 Fixes an issue where any member who has the DQS KB Operator (dqs_kb_operator) role or a higher privilege level role can create or overwrite arbitrary files on the machine hosting SQL Server as the account that runs the SQL Server service (the default account is NT SERVICE\MSSQLSERVER). Data Quality Services Data Quality Services Windows
2120779 Fixes a rare issue where memory corruption in the ODBC driver can occur in communications between two SQL Server instances. This issue occurs when the target SQL Server instance uses a down-level version of the Tabular Data Stream (TDS) protocol. An improper version check causes image data types to be decoded improperly on the client-side of the connection. SQL Connectivity SQL Connectivity Windows
2192500 Updates the version of msoledbsql.msi from 18.2.3 to 18.6.5 in SQL Server 2019, which resolves signature issues for custom actions. For more information, see Release notes for the Microsoft OLE DB Driver for SQL Server. SQL Connectivity SQL Connectivity Windows
2030140 Fixes an issue where the sqlcmd utility doesn't honor the sqlcmd command ":!!" when you run operating system (OS) commands. For more information, see sqlcmd commands. SQL Server Client Tools Command Line Tools Windows
2012343 Performance issues and deadlocks occur on SQL Server Agent in the msdb database that has automated backups. In addition, you see the following error messages in the SQL Server Agent log:

<DateTime> SQLServer Error: 1205, Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
<DateTime> Failed to retrieve job <JobID> from the server.
SQL Server Client Tools SQL Agent All
2114705 Fixes an issue with differential backup skipping new Page Free Space (PFS) pages after a data file grows around a PFS boundary (a multiple of 8,088 pages; 64,704 KB), resulting in database corruption and a possible crash dump when this differential backup is restored. SQL Server Engine Backup Restore All
2134470 Fixes a non-yielding scheduler condition (Msg 17883) that occurs when backup operations can't properly handle abort signals in some cases while waiting for pending I/O writes. SQL Server Engine Backup Restore All
2032954 Fixes an Access Violation issue that occurs when removing the database snapshot files on the readable secondary replica of an Always On availability group that has the buffer pool extension enabled. SQL Server Engine DB Management All
1943179 Fixes an assertion failure (Location: schemamgr.cpp:1253; Expression:     !regularPVSHobt->m_NeedsRefresh && !longtermPVSHobt->m_NeedsRefresh) that may occur when you run sys.dm_tran_persistent_version_store_stats on the secondary replica of an Always On availability group. SQL Server Engine High Availability and Disaster Recovery All
1990621 After you apply this fix, the cluster_nodename returns valid results when you query sys.dm_server_services in SQL Server 2019. SQL Server Engine High Availability and Disaster Recovery All
1992694 Fixes a failure of the SQL Server resource DLL (hadrres.dll) to report SQLSTATE when you retrieve the health information from SQL Server and SQLGetData returns SQL_ERROR. SQL Server Engine High Availability and Disaster Recovery Windows
2025412 After you apply this fix, the SQL Server performance counter 'Log File(s) Size (KB)' for the SQLServer:Databases object is correctly updated for secondary replicas in an Always On availability group (AG) when there's a log growth. SQL Server Engine High Availability and Disaster Recovery Windows
2044132 Fixes an access violation issue that occurs on the secondary replica of an Always On availability group while accessing the empty conversation list. This issue occurs due to a concurrency condition when the system processes the messages like HadrExtendedRecoveryForksMsg or HadrEstablishDB. SQL Server Engine High Availability and Disaster Recovery All
2023266 Fixes an assertion failure that occurs in natively compiled modules when the Inner FOR JSON operator is followed by an operator that buffers the corresponding objects, such as another FOR JSON or ORDER BY operator. Additionally, you may see the following assert expression:

Location:     memilb.cpp:<LineNumber>
Expression: (*ppilb)->m_cRef == 0
SPID:         <SPID>
Process ID:    <ProcessID>
SQL Server Engine In-Memory OLTP All
2069963 Fixes error 41842 that's incorrectly shown even when natively compiled stored procedures or in-memory transactions don't insert many records in a single transaction. Here's the error message:

Error 41842: Too many rows inserted or updated in this transaction. You can insert or update at most 4,294,967,294 rows in memory-optimized tables in a single transaction.
SQL Server Engine In-Memory OLTP All
2087572 After you apply this update, you need at least the CONTROL SERVER permission to run the procedure sys.sp_xtp_force_gc. This update changes the implementation of the procedure to a single call for allocated and used bytes to be freed. Before you apply this update, you need to call it twice. For more information, see Gradual increase in XTP memory consumption. SQL Server Engine In-Memory OLTP Windows
2147190 This improvement adds Extended Events functionality to enhance the periodic primary replica to secondary replica notification investigation in availability groups for an in-memory database. New events are generated that provide the oldest active transaction and end of log values.

This new tracing will help diagnose errors such as the following:

<DateTime>    Error: 41316, Severity: 23, State: 7.
<DateTime>    Restore operation failed for database '<DatabaseName>' with internal error code '0x84000004'.
SQL Server Engine In-Memory OLTP Windows
2153945 Fixes an assertion failure (Location: execcoll.cpp:1305; Expression: 'savepointId > HkTxSavePointDefault') that occurs during the savepoint cleanup in a Hekaton transaction. SQL Server Engine In-Memory OLTP All
2129325 Fixes error 8992 [Check Catalog Msg 3853, State 1: Attribute (owning_principal_id=<ID>) of row (principal_id=<ID>) in sys.database_principals does not have a matching row (principal_id=<ID>) in sys.database_principals.] generated by DBCC CHECKDB when executed against a database clone of a change data capture (CDC) enabled source database that has system-defined roles owned by CDC users. SQL Server Engine Metadata All
308163385 Starting in SQL Server 2019 CU19, CREATE EXTERNAL DATA SOURCE supports the use of TNS files when connecting to Oracle, by using the CONNECTION_OPTIONS parameter. SQL Server Engine PolyBase All
1021159 Adds the NullOnInvalid method for geometry and geography spatial data types to properly handle invalid spatial data. This enables you to have consistent behavior regardless of whether spatial indexes are used in your query plan. SQL Server Engine Programmability All
2024688 FIX: ParameterRuntimeValue is missing from the Showplan XML when you use the DMV sys.dm_exec_query_statistics_xml (KB5017788) SQL Server Engine Query Execution All
2042998 FIX: Scalar UDF Inlining issues in SQL Server 2022 and 2019 (KB4538581) SQL Server Engine Query Execution All
2034115 Fixes a failure to automatically resolve an inter-query deadlock that involves parallel resources. Deadlocks are usually resolved automatically by SQL Server but not for specific conditions before you apply this fix. So if you're collecting xml_deadlock_report Extended Events, you'll get continuous outputs for it until you manually kill the problem session. SQL Server Engine Query Execution All
2061830 Fixes the following stack overflow error that occurs when deeply nesting APPLY operations:

Msg 8621, Level 17, State 1, Line <LineNumber>
The query processor ran out of stack space during query optimization. Please simplify the query.

Note: This fix allows the nesting depth of the APPLY operator to be equal to or better than the functionality in SQL Server 2017.
SQL Server Engine Query Execution All
2116382 Fixes a failure to raise the proper data type overflow error when a comma-separated values (CSV) file has an integer (int) value larger than the maximum value of int and you run SELECT <integer_column_name> FROM OPENROWSET on this CSV file. SQL Server Engine Query Execution All
2122673 The fix stops reporting transient error conditions that @@ERROR previously occurred when running queries by using a plan stored in Query Store (QDS). SQL Server Engine Query Execution All
2139793 Improvement: Automatically enables the binary large object (BLOB) trace ring buffer feature when a BLOB assertion failure is detected. This improvement helps to better investigate such issues. SQL Server Engine Query Execution All
2162840 Fixes a self-deadlock issue where internal update statistic transactions persist locks, which can cause unresolved deadlocks with user queries. The issue occurs because the lock isn't released when the system runs the update query statistics. After you apply this fix, the lock can be released as intended. SQL Server Engine Query Execution All
2046472 FIX: Table-valued function that uses a parameter and the OPTION (OPTIMIZE FOR) clause gives incorrect results on the first run (KB5022920) SQL Server Engine Query Optimizer All
2086069 Fixes an issue where an authenticated attacker could affect SQL Server memory when executing a specially crafted CREATE STATISTICS or UPDATE STATISTICS statement. SQL Server Engine Query Optimizer All
2016962 FIX: Error 20598 after adding columns that have default constraints as part of the primary key for an existing table and configuring transactional replication (KB5018231) SQL Server Engine Replication Windows
2013429 Fixes an issue where the Distribution Agent returns a general message code 20046 instead of the connection failure message code 20084 when it fails to connect to the Subscriber by using the non-cached connection. These errors are specific to the Replication Distribution Agent.

Error message:

20046: The process encountered a general external error.
20084: The process could not connect to server.
SQL Server Engine Replication All
2047657 Consider the following scenario:

- You have a transactional replication setup.
- You execute the sp_changearticle stored procedure to change the property of an article on the publisher, and data manipulation language (DML) changes occur on the published table.

In this scenario, the Log Reader Agent reader thread may generate the following assertion dump when processing the log records:

* Location:     replrowset.cpp:<LineNumber>
* Expression:     (LSN)m_curLSN < (LSN)(pSchemas->schema_lsn_begin)
* SPID:         <SPID>
* Process ID:    <ProcessID>
SQL Server Engine Replication All
2068768 Fixes a gradual memory leak in the SQL Server process (the high usage under MEMORYCLERK_SOSNODE) caused by the Log Reader Agent in transactional replication. SQL Server Engine Replication All
2086544 Fixes an issue with Change Tracking manual cleanup that caused internal tables to have orphaned records. Previously if the stored procedure experienced a lock timeout on a given table, cleanup wouldn't mark the table for retry and continue cleaning up the next table in the list. After you apply this fix, the table will be marked for retry. SQL Server Engine Replication All
2104413 Fixes an issue where the temporary linked server created by the Log Reader Agent isn't always properly dropped when the publisher is in an Always On availability group (AG) and there's a failover at the distributor. After you apply this fix, the linked server is properly removed. SQL Server Engine Replication Windows
2133575 Resolves a query performance issue that affects change tracking autocleanup and manual cleanup queries.

Note: You need to turn on trace flags 8286 and 8287, as this forces the cleanup query to use the FORCE ORDER and FORCESEEK hints to speed up the performance.
SQL Server Engine Replication All
2145226 Fixes a primary key violation error that's caused by a timing issue in change data capture (CDC) in SQL Server 2019. The CDC capture process may try to insert a duplicate start_lsn value in the cdc.lsn_time_mapping table, and you may see an error message that resembles the following one:

Violation of PRIMARY KEY constraint 'lsn_time_mapping_clustered_idx'. Cannot insert duplicate key in object 'cdc.lsn_time_mapping'. The duplicate key value is (Value).

Note: This fix covers all the causes of this error. For the same issue that occurs in SQL Server 2019 that has a previous cumulative update installed, SQL Server 2017, and SQL Server 2016, see the previous fix KB 4521739. However, the previous fix didn't cover all the cases.
SQL Server Engine Replication All
2151106 Fixes error 241 that occurs while running the Snapshot Agent, and the system date format was changed to a different format than the one used by SQL Server.

Error message:

Conversion failed when converting date and/or time from character string.
SQL Server Engine Replication All
2118514 FIX: Database accessibility issues with high-volume customer workloads that use EKM for encryption and key generation (KB5023236) SQL Server Engine Security Infrastructure Windows
2021484 Fixes spelling issues in Database Engine error messages in SQL Server 2019. SQL Server Engine SQL Engine All
2086005 Fixes an access violation exception that occurs in sqlmin.dll!sort_persistresumableprogress when you try to run the CREATE INDEX command that uses the RESUMABLE = ON option. SQL Server Engine Table Index Partition All
2116348 Fixes error 692 that occurs when you create a non-clustered index under the following scenario:

- A clustered index already exists in the table.
- You create a non-clustered index that has the RESUMABLE option.
- The non-clustered index has an INCLUDE clause that has the key columns from the clustered index but in a different order.

Error message:

Msg 692, Level 22, State 1, line <LineNumber>
Internal error. Buffer provided to write a fixed column value is too large. Run DBCC CHECKDB to check for any corruption.

Note: Specifying the included columns in the same order as in the clustered index or removing them from the INCLUDE clause can prevent the error.
SQL Server Engine Table Index Partition Windows
2122726 Lock escalation policy propagation from a user table that has spatial columns to the internal table of related spatial indexes is enabled, which minimizes the chance of deadlocks in the case of highly concurrent data manipulation language (DML) workloads. SQL Server Engine Table Index Partition All
2123502 Fixes an assertion issue (Location: tabcreat.cpp:16938; Expression: idIS/8 < sizeof(bmIndexId)) that occurs when you run ALTER TABLE ALTER COLUMN on a table that has many indexes and statistics. SQL Server Engine Table Index Partition Windows
2137926 Fixes an issue where schema modification (Sch-M) locks are acquired on foreign key tables when altering columns on the primary tables even if the transaction isn't related to the foreign key column. After you apply this fix, SQL Server only acquires schema stability (Sch-S) locks on foreign key tables. For more information, see Schema locks. SQL Server Engine Table Index Partition All

How to obtain or download this or the latest cumulative update package

File information

Notes for this update

How to uninstall this update

References


Feedback

Was this page helpful?

Additional resources