SQL Server Restart or Cluster Failover Notification

  • 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

  • I prefer to split notifications for Agent restarts and Instance restarts => someone may restart instance and forget to restart Agent 🙁

    Solution:
    Agent restarts: with job as described
    Instance restarts: add a startup procedure, code aboute the same as described in article

    You can do this without Windows Admin privileges and don't have to worry about reading Windows Logs (in case of failover)

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply