Tuesday 8 March 2022

ADD and Remove the DB from AG

 

Removing the DB from AG group:

 

1.       Connect to the server 'Server Name' using SSMS

2.       Click On Availability Groups and expand the Availability groups and expand Availability databases

 


3.       Now right click on the selected database and click on remove database from availability Group



 

4.       Now notice the database has been removed from the availability group

 

Re adding the DB to AG group :

 

1.       Connect to the secondary node 'Server Name '

2.       Notice the database that we removed from AG is in restoring state

3.       Drop the database from the secondary node

Drop database 'DBname'

4.       Connect to the Primary Node again

5.       Go to Availability Groups and expand AG Group and expand availability databases

6.       Now right click on availability databases and click on

 



7.       Now select your database to add to AG in the window and click next

 



 

8.       Now click on connect to connect secondary replica and click next

 



 

9.       Now select the second option and give the shared path as shown in below image and click next

 



 

10.   Now click on Next--> Next---> Finish

11.   Notice the database is added to the AG group and it is in synchronised state

 

No comments:

Post a Comment