We have a few servers in a High Availability group and need to configure email notification for any failover that happens on the server.
Sql-server – How to enable email notification for failover in SQL Server
availability-groupssql server
Related Question
- Sql-server – SQL Server alerts not sending notification emails to the operator
- Sql-server – How to fail over availability groups on multiple remote servers
- SQL Server – Automatic Failover Not Triggered in Always On Availability Groups
- SQL Server – Failover Availability Group from Linked Server
- SQL Server – Availability Group Configuration Steps
- SQL Server – Why Automatic Failover for HA and Manual Failover for DR?
Best Answer
You can set up a SQL Agent alert for event 1480 that filters on the string
"RESOLVING" to "PRIMARY"
The reason for the filter is that 1480 events cover all state transitions. If a secondary loses connection for a bit, it will go into resolving, then back to secondary, so if you don't use a filter you'll get alerts on more than just failover.