I am looking to find ways to detect when a SQL Server AG failovers manually by a user or automatically by the SQL Server.
I am in need to of this detection to trigger some post AG switchover logic when an automatic failover happens.
I found some internet post suggesting to look for windows event id 1641 but this id is not present on all the scenario that triggers automatic failover of an AG. I wonder if there is any event or SQL error log that differentiate between manual vs automatic.
Thanks