Environment

-> Database Server JBSAG1 and JBSAG2 hosts SQL Server 2017. The requirement was to perform an In-Place upgrade to SQL Server 2019 on JBSAG1 and JBSAG2.
-> Database Server JBSAG1 is secondary replica and JBSAG2 is primary replica.
-> In-place upgrade from SQL Server 2017 to SQL Server 2019 was started on JBSAG1 as it is the secondary replica. It completed fine without any issues.
-> After the upgrade, connected to JBSAG1 using SSMS and performed a health check. The database JBDB on SQL Server instance JBSAG1 showed as Synchronized / In Recovery as show in below screenshot,

-> Checked SQL Server error log and found below message,
2020-09-10 15:05:27.020 spid53 Error: 946, Severity: 14, State: 1.
2020-09-10 15:05:27.020 spid53 Cannot open database ‘JBDB’ version 869. Upgrade the database to the latest version.
Cannot open database ‘JBDB’ version 869. Upgrade the database to the latest version. (Microsoft SQL Server, Error: 946)
-> The message is very clear. After the In-place upgrade, the database should be upgraded to latest version which is SQLS erver 2019, since the database is in Always on secondary, setup process was not able to upgrade it during the upgrade process.
-> Checking the Always On availability group dashboard from primary replica JBSAG2,

-> There are no errors and Always On availability group is in healthy state. So it is safe to failover Availability group from JBSAG2 to JBSAG1. Once after the failover, the database will get upgraded.
-> After the failover database JBDB in JBSAG1 is online and synchronized,

-> Checking the Always On dashboard,


-> JBSAG2 which is the secondary replica now and shows database JBDB as “Not Synchronizing / In Recovery”. On JBSAG2, check the database JBDB status under Availability databases and you will see that the database is paused.

-> We are seeing this in paused state because after failover the current Primary JBSAG1 is in SQL Server 2019 and the secondary JBSAG2 is in SQL Server 2017. Now it is time to perform an In-Place upgrade to SQL Server 2019 on JBSAG2 and the database JBDB in “Not Synchronizing / In Recovery” state in JBSAG2 is expected.
<TESTING ONLY – DONOT PERFORM ON LIVE SERVERS>
-> I will try resuming the database JBDB on JBSAG2 without
performing an In-Place upgrade from SQL Server 2017 to SQL
Server 2019.

-> Checking SQL Server error log. Below message can be found,
2020-09-10 15:20:21.490 spid71 ALTER DB param option: RESUME
2020-09-10 15:20:21.500 spid71 Always On Availability Groups data
movement for database ‘JBDB’ has been resumed. This is an
informational message only. No user action is required.
2020-09-10 15:20:21.500 spid77s Always On Availability Groups
connection with primary database established for secondary
database ‘JBDB’ on the availability replica ‘JBSAG1’ with Replica ID:
{850de16e-2c2b-43b1-bf52-6d8c5e2046ff}. This is an informational
message only. No user action is required.
2020-09-10 15:20:21.500 spid77s Error: 948, Severity: 20, State:
102.
2020-09-10 15:20:21.500 spid77s The database ‘JBDB’ cannot be
opened because it is version 904. This server supports version
869 and earlier. A downgrade path is not supported.
2020-09-10 15:20:21.500 spid77s Always On Availability Groups
data movement for database ‘JBDB’ has been suspended for
the following reason: “system” (Source ID 7; Source string:
‘SUSPEND_FROM_REVALIDATION’). To resume data
movement on the database, you will need to resume the
database manually. For information about how to resume an
availability database, see SQL Server Books Online.
-> The message clearly tells that the database should be upgraded
before resuming the data movement. Hence In-Place upgrade of
JBSAG2 should be performed.
<TESTING ONLY – DONOT PERFORM ON LIVE SERVERS>
-> Performed In-Place upgrade from SQL Server 2017 to SQL Server 2019 on database server JBSAG2.
-> I checked the Always On dashboard. The database JBDB was still “Not Synchronizing / In Recovery” and was suspended.

-> I resumed the data movement for database JBDB on database server JBSAG2 and it worked fine this time. Below is the Always On dashobaord,

Thank You,
Vivek Janakiraman
Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.