Skip to the content
The Update Bureau
SQL Server 2019 CU31 SQL Server 2019 CU31 Cumulative update

KB5049296

KB5049296: Cumulative update for SQL Server 2019, CU branch, February 2025. Read-scale AG metadata loss; SESSION_CONTEXT may return wrong results

In short

Includes 10 fixes, but it can remove read-scale availability group metadata on a patched replica. Queries using SESSION_CONTEXT might also return incorrect results or trigger access violation dumps in parallel plans.

Does it affect you? Applies to: SQL Server 2019 instances on Windows or Linux. The package applies to all supported languages and updates only the components already installed on the instance.

Build
15.0.4420.2
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 10 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.

High Availability and Disaster Recovery

  • Creating an availability group with a name longer than 64 characters no longer triggers the listed assertion failures.2
    Fixes assertion failures when creating an availability group with CLUSTER_TYPE set to NONE and a name longer than 64 characters.

Linux

For: SQL Server on Linux administrators

  • Some transactions no longer face extended waits during flush operations with the specified alternate write-through setting.3
    Fixes a race condition during flush operations when control.alternatewritethrough = 1.

Management Services

  • Database Mail logs and displays non-ASCII message text instead of showing it as question marks in the affected cases.4
    Fixes sysmail_log and sysmail_event_log entries in msdb when a reported message contains non-ASCII characters. This occurs more often on localized SQL Server versions.

Programmability

  • Scalar UDF inlining issues in SQL Server 2019 are addressed.5
    The fix is described in KB4538581, “Scalar UDF Inlining issues in SQL Server 2022 and 2019.”

Replication

3 items
  • The Log Reader Agent reports error 18749 when MaxCmdsInTran is set while change data capture is enabled.6
    Adds error 18749 for this unsupported combination; the Log Reader Agent fails if MaxCmdsInTran is set and CDC is enabled.
  • With accelerated database recovery enabled, updates to the second replicated article are applied correctly in the described configuration.7
    Fixes replication with two articles for one table when accelerated database recovery (ADR) is enabled.
  • Manual change tracking cleanup no longer sets an invalid cleanup version to a negative value when the table name is omitted.8
    Fixes the manual change tracking cleanup stored procedure when the TableName parameter isn't passed.

Security Infrastructure

  • Updating permissions on a newly added column no longer fails in the described case.9
    Fixes permission updates on a newly added column after permissions were denied on an existing column.

Patching

For: SQL Server setup administrators

  • For new installations, SQL Server Setup no longer allows Data Quality Services to be installed in Standard or Web edition.10
    DQS is supported only in Enterprise and Developer editions. This fix applies to new installations; it prevents DQS selection during setup, including when setting up a Windows Server Failover Cluster.

Known issues

  1. Open Affects: Everyone

    Incorrect behavior of SESSION_CONTEXT in parallel plans

    Queries using 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.11

    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.

  2. Resolved Affects: Organizations and IT administrators Resolved by KB5054833

    Issue two: Patching a read-scale availability group (Windows or Linux) causes the availability group on the patched replica to be removed

    Patching a Windows or Linux read-scale availability group with CU31 removes its metadata on the patched replica. SQL Server 2019 CU32 fixes this issue.12

    Resolution Fixed in KB5054833

    Install KB5054833 (or a later cumulative update) on affected devices. No manual workaround is required after updating.

Technical details

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

Data sheet

Released
2025-02-13
Classification
Updates
Type
Cumulative update
Servicing branch
CU
Restart
Required
Replaces
KB5049235, KB5046365, KB5039747, KB5037331
+2 earlier KB5035123, KB5033688
Replaced by
KB5054833
VersionBuildChannel
2019 15.0.4420.2 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 various assertion failures (for example, Location: HadrWsfcUtil.cpp:2662; Expression: *pcwchId >= cwchRequired) that you might encounter when creating an availability group (AG) with a CLUSTER_TYPE of NONE and an AG name longer than 64 characters. support.microsoft.com
  3. 3. Fixes a race condition that you encounter during flush operations when configuring control.alternatewritethrough = 1, which causes extended waits for some transactions. support.microsoft.com
  4. 4. Fixes an issue in Database Mail in which the information logged into the sysmail_log system table and sysmail_event_log view in the msdb database might be stored and displayed as "???" support.microsoft.com
  5. 5. FIX: Scalar UDF Inlining issues in SQL Server 2022 and 2019 (KB4538581) support.microsoft.com
  6. 6. Adds the following error 18749 when you use the MaxCmdsInTran parameter for the Log Reader Agent and change data capture (CDC) is enabled on the database support.microsoft.com
  7. 7. Fixes an issue in which the second article might not have updates correctly replicated if accelerated database recovery (ADR) is enabled on the database using replication with two articles for a single table. support.microsoft.com
  8. 8. Fixes an issue in which the manual change tracking cleanup stored procedure incorrectly sets the invalid cleanup version to negative when the TableName parameter isn't passed. support.microsoft.com
  9. 9. Fixes an issue in which updating permissions on the newly added column fails if you previously denied permissions on an existing column. support.microsoft.com
  10. 10. After applying this fix, SQL Server Setup won't allow DQS to be installed in SQL Server Standard or Web edition. support.microsoft.com
  11. 11. 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
  12. 12. This issue is fixed in SQL Server 2019 CU32. 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