• Lori B - Friday, December 11, 2015 11:56 AM

    KD - This would not work for an AlwaysOn failover because on the secondary all services are always up. I think to get an alert for an AlwaysOn failover all you would need to do is set up the below alert and notification on each replica and have it send an e-mail to you or your team when it fires.EXEC msdb.dbo.sp_add_alert@name = N'AG Role Change (failover)',@message_id = 1480,@severity = 0,@enabled = 1,@delay_between_responses = 0,@include_event_description_in = 1;GOEXEC msdb.dbo.sp_add_notification@alert_name = N'AG Role Change (failover)',@operator_name = N'[Operator]’,@notification_method = 1;GOMy team wrote a post on our company blog about AOAG alerts that you can see here: http://blog.sqlrx.com/2015/08/27/alwayson-monitoring-and-alerting/

    can we add html format for this