3

Is it possible to get a history of when a cluster failed over and which node became the active node?

2
  • Just want clarify, Is that AvailabilityGroups or FCI? Commented Aug 8, 2019 at 10:03
  • FCI I believe. The cluster is setup with one active and one passive node. With each node being on a separate server
    – SQLMIKE
    Commented Aug 8, 2019 at 10:10

2 Answers 2

7

Is it possible to get a history of when a cluster failed over and which node became the active node?

That depends on how your define "history". There will be, in the cluster log, system log, and potentially sprinkled in other logs depending on a few things, the events that show a failover has occurred. For example, in the event logs you might search for event 1069 which would tell you that a resource failed in the cluster.

However, logs don't go back until the beginning of time. So if it's extremely recent history you're after then you might be ok. If you're looking at since inception, the answer is, nope you can't if you weren't already capturing this data.

Extended note: It also depends on how you define failover, as per manual or automatic. Additionally if you have the SQL Server engine errorlog, you can parse it to find when the node name is not the same after startup (FCI failover) or the line items for role synchronization changes (AG).

3

Just run the code below in PowerShell. It will generate a failover history for you. It works for both AG name and Cluster name if it is not an AG.

Get-winEvent -ComputerName AGorClusterName -filterHashTable @{logname ='Microsoft-Windows-FailoverClustering/Operational'; id=1641}| ft -AutoSize -Wrap

1
  • Excellent, Windows Events Log certainly provides the AG/Cluster failover activities. Thanks. Commented Oct 27, 2022 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.