You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/sql/releases/sqlserver-2019/cumulativeupdate31.md
+117-4Lines changed: 117 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Cumulative update 31 for SQL Server 2019 (KB5049296)
3
-
description: This article contains the summary, known issues, improvements, fixes and other information for SQL Server 2019 cumulative update 31 (KB5049296).
4
-
ms.date: 02/13/2025
3
+
description: This article contains the summary, known issues, improvements, fixes, and other information for SQL Server 2019 cumulative update 31 (KB5049296).
@@ -23,15 +23,128 @@ This article describes Cumulative Update package 31 (CU31) for Microsoft SQL Ser
23
23
24
24
## Known issues in this update
25
25
26
-
### Access violation when session is reset
26
+
### Issue one: Access violation when session is reset
27
27
28
28
SQL Server 2019 CU14 introduced a [fix to address wrong results in parallel plans returned by the built-in SESSION_CONTEXT](https://support.microsoft.com/help/5008114). However, this fix might create access violation dump files when the SESSION is reset for reuse. To mitigate this issue and avoid incorrect results, you can disable the original fix, and also disable the parallelism for the built-in `SESSION_CONTEXT`. To do this, use the following trace flags:
29
29
30
30
- 11042 - This trace flag disables the parallelism for the built-in `SESSION_CONTEXT`.
31
31
32
32
- 9432 - This trace flag disables the fix that was introduced in SQL Server 2019 CU14.
33
33
34
-
Microsoft is working on a fix for this issue and it will be available in a future CU.
34
+
### Issue two: Patching a read-scale availability group (Windows or Linux) causes the availability group on the patched replica to be removed
35
+
36
+
If you use the read-scale availability group (AG) feature in SQL Server on Windows or Linux, you should **not** install this CU.
37
+
38
+
This CU introduced [a fix to support AG names longer than 64 characters](#3548672). However, when the patch is installed on an instance that has the read-scale AG configured, the AG metadata is dropped. This issue affects read-scale AGs in both [Windows](/sql/database-engine/availability-groups/windows/read-scale-availability-groups) and [Linux](/sql/linux/sql-server-linux-availability-group-configure-rs), which means that the `CLUSTER_TYPE` of the AG is either `NONE` or `EXTERNAL`.
39
+
40
+
When the AG is dropped after patching, you'll see the error message in the [SQL Server error log](/sql/tools/configuration-manager/viewing-the-sql-server-error-log) similar to the following one:
41
+
42
+
```output
43
+
<DateTime> Error: 19433, Severity: 16, State: 1.
44
+
<DateTime> Always On: AG integrity check failed to find AG name to ID map entry with matching group ID for AG '<AGName>' (expected: '<AGName>'; found '<GUID Value>').
45
+
<DateTime> Always On: The local replica of availability group '<AGName>' is being removed. The instance of SQL Server failed to validate the integrity of the availability group configuration in the Windows Server Failover Clustering (WSFC) store. This is expected if the availability group has been removed from another instance of SQL Server. This is an informational message only. No user action is required.
46
+
```
47
+
48
+
After the patch is installed, the metadata is removed and you must re-create the AG on the patched replica. If the AG replicas have mismatched SQL Server versions (for example, the primary replica is running SQL Server 2019 CU30 and the secondary replica is running SQL Server 2019 CU31), you can't re-create the AG on the replica with the missing metadata (the secondary replica). In order to add the AG again, you must uninstall the patch on the secondary replica first and then add the AG again.
49
+
50
+
#### Example
51
+
52
+
You can use steps that are similar to the following ones, but you need to update them for the given environment, including the `CLUSTER_TYPE`. The VM1 in the given example is the primary replica of the AG 'readscaleag' and VM2 is the secondary replica that has the patch applied but already uninstalled. Before running the script, both replicas VM1 and VM2 are running SQL Server 2019 CU30 and the AG metadata is missing on VM2. To run this script, use [SQLCMD mode](/sql/tools/sqlcmd/edit-sqlcmd-scripts-query-editor).
53
+
54
+
```sql
55
+
-- You must run this query in SQLCMD mode
56
+
:setvar PrimaryServer "VM1\SQL19"
57
+
:setvar SecondaryServer "VM2\SQL19"
58
+
:setvar AvailabilityGroupName "readscaleag"
59
+
:setvar EndpointURL "TCP://VM2.Contoso.lab:5022"
60
+
:setvar DatabaseName "testReadScaleAGDb"
61
+
:setvar ClusterType "NONE"
62
+
63
+
-- Connect to primary server
64
+
:CONNECT $(PrimaryServer)
65
+
66
+
-- Remove replica on secondary server
67
+
ALTER AVAILABILITY GROUP $(AvailabilityGroupName) REMOVE REPLICA ON N'$(SecondaryServer)';
68
+
GO
69
+
70
+
-- Connect to primary server again
71
+
:CONNECT $(PrimaryServer)
72
+
73
+
USE [master];
74
+
GO
75
+
76
+
-- Add replica on secondary server
77
+
ALTER AVAILABILITY GROUP $(AvailabilityGroupName)
78
+
ADD REPLICA ON N'$(SecondaryServer)' WITH (
79
+
ENDPOINT_URL = N'$(EndpointURL)',
80
+
FAILOVER_MODE = MANUAL,
81
+
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
82
+
BACKUP_PRIORITY =50,
83
+
SECONDARY_ROLE(ALLOW_CONNECTIONS = NO)
84
+
);
85
+
GO
86
+
87
+
-- Connect to secondary server
88
+
:CONNECT $(SecondaryServer)
89
+
90
+
-- Join availability group with cluster type none
91
+
ALTER AVAILABILITY GROUP $(AvailabilityGroupName) JOIN WITH (CLUSTER_TYPE = N'$(ClusterType)');
92
+
GO
93
+
94
+
-- Connect to secondary server again
95
+
:CONNECT $(SecondaryServer)
96
+
97
+
-- Set database to availability group
98
+
-- Wait for the replica to start communicating
99
+
BEGIN TRY
100
+
DECLARE @conn BIT;
101
+
DECLARE @count INT;
102
+
DECLARE @replica_id UNIQUEIDENTIFIER;
103
+
DECLARE @group_id UNIQUEIDENTIFIER;
104
+
105
+
SET @conn =0;
106
+
SET @count =30; -- wait for 5 minutes
107
+
108
+
IF (SERVERPROPERTY('IsHadrEnabled') =1)
109
+
AND (ISNULL((SELECT member_state
110
+
FROMmaster.sys.dm_hadr_cluster_members
111
+
WHEREUPPER(member_name COLLATE Latin1_General_CI_AS) =UPPER(CAST(SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS NVARCHAR(256)) COLLATE Latin1_General_CI_AS)), 0) <>0)
0 commit comments