Tuesday, June 6, 2017

Steps to apply patches in Always on availability group replica servers

How do apply patch in always on availability group replica servers?

1. Make sure to connect the instances using 'Multisubnetfailover=TRUE' as this required to perform failover.

2.perform the patch apply in the secondary server replica .

3.Reboot the secondary server replica and perform health check .

4.Ensure databases are in synchronising mode in the secondary server replica .

-- select * from sys. Dm_hadr_database_replica_states.

Just check the synchronisation_state_desc and synchronisation_health_desc  column value for health values.

5.If Always on is configured in Asynchronous mode , then make sure to change it to Synchronous mode to avoid data loss.( Revert back to asynchronous mode once all steps for patch completed in both servers).

Alter  availability group group_name
Modify replica on 'server name '

With

({ availability _mode =synchronous_commit|asynchronous_commit})

6.Failover the Always on group to the Secondary server replica.

Use master
Go
Alter availability group availability _group Failover
Go


7.Ensure databases are in synchronised mode , if no , execute the following script for all availability group databases .

Use master
Go
Alter database database_name
Set HADR resume

8.Apply the patch in the old primary server(Current secondary replica)

9.Reboot the old primary server and perform health check .

10.Failover from old secondary server to old primary server(production)

Execute below script

Use master
Go
Alter availability group availability _group Failover
Go

11.Perform health check .

To verify everything in place , view the dashboard of The availability group in sql server management studio.

Make sure New patch got applied in both servers successfully .





No comments:

Post a Comment

MYSQL:::Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables

  Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables Introduction: In the dynamic landscape of database management...