Is this a standard FCI instance? If so - then you can create a SQL Server agent job that executes on start-up.
Sql server cluster node failover details
Hi
I would like to know the SQL server cluster node failover details immediately as soon as the passive node is active as I have some dependency. For that, I see sys.dm_os_cluster_nodes view will provide the active/passive node details, but I am not able to write a trigger on this view to send a mail automatically.
I spent some time but was not able to find out. I can write a SQL job to monitor but I will not prefer that.
Could you please help in guiding me to get a notification mail once the active node becomes passive or vice versa.
Thank you.
Thanks & Regards,
Sriram
4 answers
Sort by: Most helpful
-
-
AmeliaGu-MSFT 13,971 Reputation points Microsoft Vendor
2020-08-19T02:18:42.353+00:00 Hi Sriram,
Please refer to the scripts in the following articles which might help:
Automatic Alert Generation in the event of SQL Server Cluster Failover
How to monitor SQL Server failover events automatically
SQL Server Restart or Cluster Failover NotificationBest Regards,
Amelia -
Sreekanth Madambath 86 Reputation points
2020-08-19T08:44:21.39+00:00 Create an SQL Server alert with cluster failover event id.
-
Soccan 16 Reputation points
2020-08-20T08:31:57.66+00:00 Or if you want to go more windows and create a scheduled task that has a triger for event id 1201 in the windowsfailoverclustering/operational log. We have a misbehaving apppool in IIS that we restart this way.... So while your at it, maybe you could get this task to handle your dependency?