Troubleshoot an availability group failover
Cluster log components, sources to check and Microsoft references to diagnose an unexpected Always On failover.
When an Always On availability group fails over unexpectedly, the diagnosis uses both the SQL Server logs and the Windows failover cluster logs. The table lists the component names that appear in those logs, and the list after it gives the places to look.
Components named in the cluster log
| Term | Meaning |
|---|---|
| RHS | Resource Hosting Subsystem, the cluster process that hosts the resource DLLs |
| WER | Windows Error Reporting |
[RES], [hadrag] |
Prefixes of the cluster log lines written for Always On resources |
hadrres.dll |
Always On availability group resource DLL |
| RCM | Resource Control Manager, a component of the cluster service |
Where to look
- Windows Event Viewer: cluster and system events around the time of the failover.
- SQL Server error log: messages written by the instance during the failover.
- Cluster log: generated with the
Get-ClusterLogcmdlet of the FailoverClusters module, which writes the log to a folder:
Get-ClusterLog -Destination C:\Temp\ClusterLogs
sp_server_diagnostics: a system stored procedure that returns the health information gathered by thesystem_healthextended events session.
Lease timeouts
The Microsoft articles below explain how failover detection depends on the lease timeout of the availability group, and how to diagnose an unexpected failover.
References
- Diagnose an unexpected failover or availability group in resolving state (Microsoft SQL Server Support blog)
- How it works: SQL Server AlwaysOn lease timeout (Microsoft PSS SQL blog, archived)
Notes
- The source was a list of search pointers. The terms are general and the list is not a procedure; use the Microsoft articles for the steps.
- The source named the RCM component as "Resource Control Monitor"; the component name is Resource Control Manager.
- A broken link and a third-party blog link from the source were not kept.