Skip to the content
The Update Bureau
SQL Server 2022 CU17 SQL Server 2022 CU17 Cumulative update

KB5048038

KB5048038: Cumulative update for SQL Server 2022, CU branch, January 2025. Parallel SESSION_CONTEXT queries may return incorrect results

In short

Parallel queries that use SESSION_CONTEXT might return incorrect results or trigger access-violation dumps. CU17 also adds Always On support for Pacemaker clusters when SQL Server runs as a restricted application with SELinux enabled.

Does it affect you? Applies to: Installations of SQL Server 2022. The CU package is x64; the update changes only components installed on the SQL Server instance. The listed fixes and changes apply to Windows, Linux, or all platforms as specified for each item.

Build
16.0.4175.1
Servicing branch
CU
Restart
Required

For servers on the CU branch: they install cumulative updates, which also bring fixes beyond security. Servers on the GDR branch (security fixes only) get a separate update. Which branch am I on?

What changes

Fixes 7 changes

Master Data Services

For: Master Data Services users

  • The business rule item for the domain-based attribute option works correctly in Master Data Services.1
    Fixes the business rule item for the domain-based attribute (DBA) option. Windows.

High Availability and Disaster Recovery

For: Availability group administrators

  • After a Windows Server Failover Clustering quorum loss, some availability group databases can move to a resolving state when persisted configuration data can't be read.2
    The change addresses databases left in a non-synchronized state following WSFC quorum loss. All platforms.

Programmability

2 items
  • Scalar UDF Inlining issues are fixed in SQL Server 2022 and 2019.3
  • The SUBSTRING function no longer has the described performance issue during extensive use, such as when building indexes on computed columns that use the function.4
    Applies to expressions that involve calls to SUBSTRING. All platforms.

Replication

For: Replication administrators

  • The Replication Log Reader Agent no longer reports “The XML data type is damaged” when an XML column is updated with XML compression enabled.5
    Windows.

SQL OS

  • Index builds in simple or bulk-logged recovery models with indirect checkpoints no longer encounter the listed assertion failures.6
    Addresses failures such as Location: sosmerge.cpp:2930; Expression: mrP->mrpgcnt > 0, caused by missing flushes of intermediate data pages. All platforms.

Transaction Services

  • With trace flag 15915 enabled, frequently calling sp_lock from multiple connections no longer causes the described performance issue and memory leak.7
    The memory in the reported issue wasn't cleaned up until the SQL Server service was restarted. All platforms.

New features 3 changes

High Availability and Disaster Recovery

2 items
  • A new trace flag can increase the maximum number of parallel redo threads based on the total number of CPUs.8
    Trace flag 3478 aims to restore the same functionality as SQL Server 2016 or later when the thread pool is disabled in SQL Server 2022. All platforms.
  • Always On availability groups can use a Pacemaker cluster in the specified Linux configuration.9
    Applies when SQL Server runs as a restricted application with Security-Enhanced Linux (SELinux) enabled. Linux.

In-Memory OLTP

  • A new server option lets SQL Server use the Hekaton DLL Generator for the In-Memory OLTP feature.10
    The external xtp dll gen util enabled server configuration option is set by using sp_configure. Hekaton-generated DLLs can meet code-integrity requirements. Windows.

Improvement 1 change

Security Infrastructure

  • Microsoft Entra managed identities can be used for database backup and restore operations and for EKM with AKV on SQL Server on Azure VMs.11
    The table lists this change for Windows.

Known issues

  1. Open Affects: Everyone

    Incorrect behavior of SESSION_CONTEXT in parallel plans

    Queries that use SESSION_CONTEXT might return incorrect results or trigger access-violation dump files when they run in parallel query plans, particularly if the session is reset for reuse.12

    Workaround status No workaround yet

    Microsoft has not published a manual workaround for this issue yet. Monitor release health until a resolving update is available.

Technical details

Data sheet · Security · Downloads · Components Click to collapse or expand

Data sheet

Released
2025-01-16
Classification
Updates
Type
Cumulative update
Servicing branch
CU
Restart
Required
Replaces
KB5048033, KB5041321, KB5038325, KB5036432
+2 earlier KB5033663, KB5032679
Replaced by
KB5050771
VersionBuildChannel
2022 16.0.4175.1 General availability

Security

No vulnerabilities are listed for this update.

Downloads (Microsoft Update Catalog)

Sources

Updated
Cited passages from Microsoft's official notes (12)
  1. 1. Fixes an issue with the business rule item for the domain-based attribute (DBA) option when you use Master Data Services. support.microsoft.com
  2. 2. Fixes an issue in which some availability group (AG) databases are in a non-synchronized state after the Windows Server Failover Clustering (WSFC) quorum loss. support.microsoft.com
  3. 3. FIX: Scalar UDF Inlining issues in SQL Server 2022 and 2019 (KB4538581) support.microsoft.com
  4. 4. Fixes a performance issue of the SUBSTRING function that you encounter when extensively using the function, such as building indexes on computed columns with expressions that involve calling SUBSTRING. support.microsoft.com
  5. 5. Fixes error "The XML data type is damaged" thrown by the Replication Log Reader Agent when you update an XML column with XML compression enabled. support.microsoft.com
  6. 6. Fixes various assertion failures (for example, Location: sosmerge.cpp:2930; Expression: mrP->mrpgcnt > 0) that you might encounter when building an index in simple or bulk-logged recovery models with indirect checkpoints because of missing flushes of intermediate data pages. support.microsoft.com
  7. 7. Fixes a performance issue that you might encounter only when sp_lock is called frequently from multiple connections, which might cause a memory leak. support.microsoft.com
  8. 8. Adds trace flag 3478 in SQL Server 2022 to allow the maximum number of parallel redo threads to be increased based on the total number of CPUs. support.microsoft.com
  9. 9. Starting in SQL Server 2022 CU17, you can enable Always On availability groups by using a Pacemaker cluster when SQL Server runs as a restricted application with Security-Enhanced Linux (SELinux) enabled. support.microsoft.com
  10. 10. Adds a server configuration option external xtp dll gen util enabled, which is configured by using sp_configure to enable the Hekaton dynamic-link library (DLL) Generator component for the Hekaton (In-Memory OLTP) feature. support.microsoft.com
  11. 11. Improvement: Microsoft Entra managed identity support for backup and restore database operations and for EKM with AKV in SQL Server on Azure VMs (KB5043526) support.microsoft.com
  12. 12. 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. support.microsoft.com
Checked automatically: 8 of 8 checks passed, 12 quoted passages · compared with Microsoft's page on Oct 20, 2026
  • Quotes found in the official pages: passed
  • Numbers found in the sources: passed
  • Vulnerabilities from the dossier only: passed
  • Links to allowed domains only: passed
  • Every official change covered: passed
  • Readable plain text: passed
  • Changes confirmed by the file list: passed
  • Sources agree: passed

A second AI read the text against the sources: correctness 5/5, clarity 4/5, completeness 5/5. How we work

Published by The Update Bureau. Written with AI from Microsoft's own documents, checked by rules and a second AI. How we work · Report a mistake