KB5038325: Cumulative update for SQL Server 2022, CU branch, July 2024. SQL backups can fail; parallel queries may return wrong results
Includes 12 fixes for SQL Server 2022, but it also lists backup and parallel-query problems. The backup issue is fixed in CU15; the parallel-query issue remains open.
Does it affect you? Applies to: Instances running SQL Server 2022, on Windows or Linux. The package updates only the SQL Server components installed on the instance.
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 9 changes
Management Services
-
Maintenance plan logs no longer show garbled characters when messages contain characters outside the basic English alphabet.1
Fixes garbled non-ASCII characters in maintenance plan log messages.
Backup Restore
-
A Volume Shadow Copy restore no longer reports a missing file path error on instances where databases were deleted.2
Fixes the
GetVolumePathNameerror during a VSS restore when the SQL Server instance previously had deleted databases.
Extensibility
-
The SQL Server Launchpad service can shut down properly after certain startup errors.3
Fixes the Launchpad service failing to shut down after certain startup errors.
High Availability and Disaster Recovery
-
A remote replica no longer stays marked as not synchronizing for several minutes after repeated failovers between local replicas.4
Applies to cloud deployments with multiple local replicas and at least one remote replica across multiple subnets and regions.
-
Certain file-stream transactions in an availability-group setup no longer trigger an unexpected SQL Server diagnostic failure.5
Fixes an assertion dump involving FILESTREAM transactions in an Always On availability group.
Linux
For: Linux users
-
SQL Server on Linux no longer exceeds the configured memory limit in the issue covered by this fix.6
Fixes memory exceeding the limit specified by
memory.memorylimitmb.
Programmability
For: All platforms
-
Queries that return results in a specified format no longer trigger an internal failure when UTF-8 text settings are used.7
Fixes an assertion failure involving UTF-8 collations and the
WITH RESULT SETSclause.
Query Optimizer
For: All platforms
-
Queries that use feedback to improve row estimates no longer cause cached plans to accumulate or trigger SQL Server failures during recompilation.8
Fixes plan cache leaks and access violations caused by race conditions during statement recompilations in cardinality-estimation feedback.
Replication
For: All platforms
-
Change-tracking cleanup no longer repeatedly uses CPU when change tracking is disabled on all databases. If leftover tracking rows remain, re-enable and then disable change tracking on those databases to clear them.9
Fixes change tracking auto cleanup consuming CPU every 30 minutes when change tracking is disabled on all databases. If rows remain in
sys.syscommittabordbo.MSchange_tracking_history, re-enable and then disable change tracking on the affected databases.
Improvements 2 changes
Command Line Tools
For: Linux container users
-
Linux container images use the newer Microsoft command-line tools directory; the former directory is being phased out.10
Starting with CU14, container images include
mssql-tools18; the tools directory changes from/opt/mssql-tools/binto/opt/mssql-tools18/bin.
Query Optimizer
For: All platforms
-
SQL Server estimates results more accurately for certain filters when its data statistics contain only one histogram step.11
Improves cardinality estimation for predicates requesting ranges disjoint from column statistics when those statistics have one histogram step.
New feature 1 change
High Availability and Disaster Recovery
-
The cluster log report includes performance-monitor counters when a health-check timeout is reported.12
Adds performance monitor counters to the cluster log report for health check timeouts.
Known issues
-
Incorrect behavior of SESSION_CONTEXT in parallel plans
Queries using
SESSION_CONTEXTmight return incorrect results or trigger access-violation dump files when they run in parallel plans, particularly if the session is reset for reuse.13Workaround status No workaround yetMicrosoft has not published a manual workaround for this issue yet. Monitor release health until a resolving update is available.
-
Issue two: SQL Server VSS Writer might fail to perform a backup because no database is available to freeze
Backup tools might fail to create application-consistent backups because SQL Server VSS Writer has no database available to freeze. The issue is fixed in CU15.14
How to apply the workaround WorkaroundThe page's current solution is to roll back to CU13 and perform the snapshot backup.14
Step-by-step workaround instructionsShow steps Hide steps2 stepsStep-by-step procedure- Roll back to SQL Server 2022 CU13.
- Perform the snapshot backup.
-
Issue three: Patching error for secondary replicas in an availability group with databases enabled replication or CDC
Setup can initially report a failure when an availability-group database has replication or CDC enabled. SQL Server then starts again without single-user mode, and the patching scripts complete; the page says the issue is fixed in CU16.15
How to apply the workaround SQL Trace FlagTo prevent the initial failure, enable Trace Flag 12347 before patching and remove it after patching.15
Step-by-step workaround instructionsShow steps Hide steps2 stepsStep-by-step procedure- Enable Trace Flag 12347 before running the patch.
- Remove the trace flag after patching.
Technical details
Data sheet · Security · Downloads · Components Click to collapse or expand
Data sheet
- Released
- 2024-07-23
- Classification
- Updates
- Type
- Cumulative update
- Servicing branch
- CU
- Restart
- Required
- Replaces
- KB5036432, KB5033663, KB5032679
- Replaced by
- KB5042578
| Version | Build | Channel |
|---|---|---|
| 2022 | 16.0.4135.4 | General availability |
Security
No vulnerabilities are listed for this update.
Downloads (Microsoft Update Catalog)
Sources
Cited passages from Microsoft's official notes (15)
-
1.
Fixes an issue in which maintenance plan logs might report garbled characters when the message reported involves non-ASCII characters.
support.microsoft.com -
2.
Fixes the following error that you encounter during a Volume Shadow Copy Service (VSS) restore on a SQL Server instance that has previously deleted databases:
support.microsoft.com -
3.
Fixes an issue in which the SQL Server Launchpad service can't shut down properly when certain errors occur during startup.
support.microsoft.com -
4.
Fixes an issue in which the remote secondary replica shows Not Synchronizing for several minutes after successive failovers between local replicas.
support.microsoft.com -
5.
Fixes an assertion dump issue (Location: hadrlogcapture.cpp:<LineNumber>; Expression: m_pFsManager->GetEnqueuedBlockId () < capturedLogBlockId || capturedLogBlockId == m_pDbPartner->GetFirstLogBlockIdToCapture ()) that you encounter when there are FILESTREAM transactions in an Always On availability group (AG).
support.microsoft.com -
6.
Fix: Memory exceeds the configured limits that are specified by memory.memorylimitmb in SQL Server
support.microsoft.com -
7.
Fixes an assertion failure (Location: sosmemobj.cpp:2744; Expression: pvb->FInUse()) in
support.microsoft.comCVariableInfo::PviReleasethat you encounter when you use UTF-8 collations and theWITH RESULT SETSclause. -
8.
Fixes two issues related to cardinality estimation (CE) feedback: plan cache leaks and access violations due to race conditions with statement recompilations.
support.microsoft.com -
9.
Fixes an issue in which change tracking auto cleanup consumes CPU in cycles every 30 minutes even if change tracking isn't enabled on any databases.
support.microsoft.com -
10.
Starting with SQL Server 2022 (16.x) CU14, container images include the new [mssql-tools18 package]
support.microsoft.com -
11.
Improves cardinality estimation (CE) for predicates that request ranges disjoint with column statistics when statistics have only one histogram step.
support.microsoft.com -
12.
Adds performance monitor counters to the cluster log report when the health check timeout is reported.
support.microsoft.com -
13.
Queries that use the built-in
support.microsoft.comSESSION_CONTEXTfunction might return incorrect results or trigger access violation (AV) dump files when run in parallel query plans. -
14.
When backup tools such as Azure Recovery Vault perform a backup on a virtual machine (VM), they might fail to achieve application consistency.
support.microsoft.com -
15.
After SQL Server Setup initially fails, the SQL Server service then tries to come online again without single-user mode. At that time, the patch upgrade scripts finish successfully and patching is complete.
support.microsoft.com
Checked automatically: 8 of 8 checks passed, 15 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