Operational Defect Database

BugZero found this defect 1308 days ago.

Microsoft SQL Server | 13598911

KB4563115 - FIX: Upgrade script fails if you use an Always On high availability group as a secondary replica in SQL Server - Microsoft Support

Last update date:

3/22/2022

Affected products:

SQL Server 2016 Developer - duplicate (do not use)

SQL Server 2016 Enterprise - duplicate (do not use)

SQL Server 2016 Enterprise Core - duplicate (do not use)

SQL Server 2016 Standard - duplicate (do not use)

SQL Server 2019 on Windows

SQL Server 2017 Developer on Windows

SQL Server 2017 Enterprise Core on Windows

SQL Server 2017 Enterprise on Windows

SQL Server 2017 Standard on Windows

Affected releases:

build lower than 15.0.4063.15

Fixed releases:

15.0.4063.15

Description:

Symptoms

Assume that you use an Always On high availability group (AG) as a secondary replica. When you try to upgrade Microsoft SQL Server 2016 to Service Pack 2 (SP2) Cumulative Update 11 (CU11) or later versions, the upgrade script fails, and you may receive the following error messages: DateTime spidSpidId      Upgrading subscription settings and system objects in database [DatabaseName]. DateTime spidSpidId      Failed to update database "DatabaseName" because the database is read-only. DateTime spidSpidId      Error executing sp_vupgrade_replication.

Cause

When an upgrade is performed on the secondary replica of a SQL AG, there is a race between the database recovery and the upgrade script execution. Therefore, the cursor that you use inside sp_vupgrade_replication cannot filter out the read-only databases correctly. For a short time, the secondary databases in recovery phase are included in the list of editable database. Therefore, when you try to update these databases, an exception is returned because the databases are read-only.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Resolution

This issue is fixed in the following cumulative updates for SQL Server: Cumulative Update 7 for SQL Server 2019 Cumulative Update 22 for SQL Server 2017 Cumulative Update 13 for SQL Server 2016 SP2 About cumulative updates for SQL Server: Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server: Latest cumulative update for SQL Server 2019 Latest cumulative update for SQL Server 2017 Latest cumulative update for SQL Server 2016

References

Learn about the terminology that Microsoft uses to describe software updates.

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Unavailable

Learn More

Search:

...