I 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:
- Patch your Secondary/Replica first
- Do fail-over and make your secondary as Primary
- Patch the previous primary (currently secondary)
- 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:
- Start the patching activity with SSCAG03S
- Reboot SSCAG03S once patching is done
- Wait until it comes up clean, and wait till everything is in sync
- Start patching activity with SSCAG02S
- Reboot SSCAG02S once patching is done
- Wait until it comes up clean, and wait till everything is in sync
- Until this point, we have patched the replica servers and its now time to patch the Primary
- Here, in this step, we will do fail-over and make the SSCAG02S as Primary for Availability group
- Wait and monitor the Availability group, once everything is in sync
- Start patching activity with SSCAG01P
- Reboot SSCAG01P once patching is done
- Wait until it comes up clean and wait till everything is in sync
- 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
- 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)