My Environment is SQL Server 2017 Distributed Availability Groups, details as follows:
Configured SQL Distributed AG from DC1 to DC2.
- DC1 (Production): TEMPDB1 AND TEMPDB2 (HOSTED ON WSFC1)
- DC2 (DR): TEMPDB3 AND TEMPDB4 (HOSTED ON WSFC2)
- DC1 and DC2 located in two different Geo location
- DC1 is unavailable (shutdown).
Please suggest on following scenarios:
-
What are the steps/commands need to execute on DC2 to bring as a Production?
-
Once DC1 is up/running, what are the steps/commands need to execute in DC2 and DC1 to bring DC1 as a Production?
Here are the screenshots of status from 2 DC's
DC1-AG Status before DC1 shutdown:
DC2-AG Status before DC1 shutdown:
DC2-AG Status After DC1 shutdown:
After DC1 shutdown, tried to access DC2-DB1, got blow error.
Changed DC2-AG2 properties as mentioned below (Allow R/W Connections and Readable Secondary=Yes)
After changing properties, I am able to access DB1 but not able to perform any DML operations in DC2-DB1.
This DB should allow for all operations because app is pointing DC2-DB during DC1 shutdown.
Please suggest/advise on this.
Best Answer
After DC 1 is down, since your secondary availability group [distributedag] is asychronous and is in manual failover mode, it is still in secondary role, so you will need to connect to [distributedag] listener and execute command:
This will force your secondary AG at DC2 to become primary, and bring it into a read-write state