Steps to patch Always On Availability group of Primary and two replica

Steps to patch Always On Availability Group of Primary and two replicaI have seen questions – How to patch Always On Availability group or sometimes, what are the steps to patch Always On Availability group?. Let me pen down the steps to patch Always On availability group in this post for you. To understand the scenario better, let’s do an example of Always On Availability group with 3 nodes – Primary, and 2 replica. Let us name them so as to make it clear and easy to understand. Primary = SSCAG01P, Secondary = SSCAG02S, Third Replica (Asynchronous mode, Manual fail over) = SSCAG03S.¬† Since we have name the AG nodes/replica let us see the actual steps to patch Always On Availability Group.

 

Basically, the patching activity goes like this:

  1. Patch your Secondary/Replica first
  2. Do fail-over and make your secondary as Primary
  3. Patch the previous primary (currently secondary)
  4. Do fail-back and make your current secondary as Primary again

Sine we have name the servers in our example, let’s see Steps to patch Always On Availability group of Primary and two replica in detail:

  1. Start the patching activity with SSCAG03S
  2. Reboot SSCAG03S once patching is done
  3. Wait until it comes up clean, and wait till everything is in sync
  4. Start patching activity with SSCAG02S
  5. Reboot SSCAG02S once patching is done
  6. Wait until it comes up clean, and wait till everything is in sync
  7. Until this point, we have patched the replica servers and its now time to patch the Primary
  8. Here, in this step, we will do fail-over and make the SSCAG02S as Primary for Availability group
  9. Wait and monitor the Availability group, once everything is in sync
  10. Start patching activity with SSCAG01P
  11. Reboot SSCAG01P once patching is done
  12. Wait until it comes up clean and wait till everything is in sync
  13. At this point, we are done with patching and we can leave it as is. However, it is good to fail-back primary to original one
  14. So, let’s fail-back Availability group and make SSCAG01P primary again

Let me know if this blog post explaining Steps to patch Always On Availability Group of Primary and two replica helped you. I will be posting the steps for patching Replication, Log Shipping (LS) and Cluster server. Keep watching this blog space as I do post every Tuesday.

photo credit: tudedude Sliding Adjustable Spanner Wrench via photopin (license)

Comments (2)

You do this manually. why not create a -CAU object to do this automatically for you when you sleep?

P

Hi Patrick,
Thank you for the comment and nice suggestion. This was part of 100s of servers, and decided by client to patch when and what time, client wanted to control every thing manually.

Cheers!
Hemantgiri

Leave a comment