This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a DBA Script for monitoring the status of Distributed Always On Availability Group in SQL Server.
While doing set up the Distributed Always On Availability Group, you must monitor the status of it. If status becomes a SYNCHRONIZED, you can change the role of the distributed availability group. I took the below script from this official page.
Below is a script:
1 2 3 4 5 6 7 8 9 10 |
SELECT ag.name ,drs.database_id ,drs.group_id ,drs.replica_id ,drs.synchronization_state_desc ,drs.end_of_log_lsn FROM sys.dm_hadr_database_replica_states drs, sys.availability_groups ag WHERE drs.group_id = ag.group_id; |