Alerts and Monitoring for Always on

I’d been looking for a simple alert to run in SQL Agent to notify me of failover and alert number’s 41074 and 35266 seem to work reliably if you just need to know you’ve failed over.

Also using some of the new dynamic management views for monitoring and reporting we can take a look at all the availability groups on our instance and quick see their state.

FROM sys.availability_groups sag
       INNER JOIN sys.dm_hadr_availability_group_states hags ON sag.group_id = hags.group_id

I’ll be looking into this in more detail in the next few weeks and will post my findings.


Alerts and Monitoring for Always on

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest