Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

TSQL to query when and availaibity replica state changes for AlwaysOn AG

$
0
0

I know I can use the dashboard - "View AlwaysOn Health Events" - to display the values for availability_replica_state_changes but is there any Tsql I can use to query the dmvs to let me know when the replica state changes for a given availability group?

I'm looking for a script that will tell me when a replica goes from primary to secondary and vice versa.  Need to see when the replica state changes and failovers have occurred.

Thanks for any help, Mary


Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>