YES, absolutely. You must always begin your upgrade process with the Secondary Replicas. Since your cluster is now healthy, the safest rolling upgrade workflow is to upgrade the passive nodes first, leaving the active Primary (PWGIRSQL1) untouched until the very end to keep your application online.
Here is the recommended sequence:
Phase 1: Upgrade the Secondary (PWGIRSQL2)
Since PWGIRSQL2 is already a Secondary replica and you just stabilized it, it is the perfect candidate to start with.
- Backup: Take a full backup of your databases on the Primary (
PWGIRSQL1) just in case.
- Suspend Data Movement (Optional but Recommended): In SSMS, you can temporarily suspend data movement for the
PWGIRSQL2 replica if the upgrade will take a long time (to prevent the transaction log on the Primary from growing too large while waiting).
- Perform the Upgrade: Apply your Operating System updates or SQL Server patches/upgrades on
PWGIRSQL2.
- Reboot & Validate: Restart
PWGIRSQL2. Once it is back online, open SSMS on the Primary and verify that PWGIRSQL2 returns to the Synchronized (or Synchronizing) state. Phase 2: Upgrade the Next Secondary (PWGIRSQL3)
Once Node 2 is green and fully synced, repeat the process for PWGIRSQL3.
Phase 3: The Failover (Switch Roles)
Once both Secondaries (Node 2 and Node 3) are upgraded and healthy:
- Change the Availability Mode of
PWGIRSQL2 to Synchronous Commit (if it isn't already).
- Perform a Manual Failover of the Availability Group from
PWGIRSQL1 to PWGIRSQL2.
- Now
PWGIRSQL2 is the Primary and is running the new version.
- Verify applications are connecting successfully. Phase 4: Upgrade the Old Primary (PWGIRSQL1)
Now that PWGIRSQL1 is a passive Secondary, you can safely proceed to upgrade it.
VP