Failover cluster host switch


Job details

Name: Failover cluster host switch
Platform: Sqlserver
Category: Cluster and Replication
Description: Checks if an instance switched to a different host i a Windows Server Failover Cluster (WSFC).
Long description: A Windows Server Failover Cluster (WSFC) is a group of independent servers that work together to increase the availability of applications and services. A warning or an alarm can be triggered if an instance switched to a different host i a WSFC.
Version: 1.2
Default schedule: * * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[ maj_version > ‘2014′ & hasengine=‘YES’ & engine_edition = ‘Microsoft SQL Server’ ]

Parameters

Name Default value Description
preferred host A node on which the instance prefers to run. Ignored if empty.
return status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the instance switch to a different host in Windows Server Failover Cluster.
return status when preferred host 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the instance not run on the preferred host (parameter “preferred host”).
keep status 30 For how long (in minutest) to keep warning/alarm status after a switch.

Job Summary

SELECT top 20 switch_no "Switch #", primary_host "Primary host", monitoring_start "Start as Primary", monitoring_end "End as Primary" FROM dbw_failover_cluster_switch_tab ORDER BY monitoring_end DESC;

Implementation Details

Dependencies and Database Changes

Report Output and Presentation

Switch # Primary Host Start as Primary End as Primary
1 ServerA 2023-01-01 12:00:00 2023-01-02 12:00:00
2 ServerB 2023-01-02 13:00:00 2023-01-03 13:00:00

Installation and Configuration Requirements

This job is essential for maintaining high availability in clustered server environments by actively monitoring and reporting on failover events.