This repository was born from a specific operational failure. In a previous role, a lack of distinction between Local High Availability (HA) and Geographic Disaster Recovery (DR) led to an accidental failover of a 4.5TB Data Warehouse across a 1GB WAN link.
The root cause was treating a Failover Cluster Instance (FCI) like an Availability Group (AG).
SQL-Cluster-Sentry is a PowerShell-based logic gate designed to be run before any automated patching or maintenance cycle. It acts as a "Traffic Cop" for the cluster.
The script performs a Topology Audit before allowing a move:
- Who am I? Determines if the instance is an FCI (Shared Storage) or AG (Replicated Storage).
- Where is my partner? Compares the Active Node's Subnet/Site against the Target Node.
- The "Kill Switch": * IF
InstanceType == FCI- AND
SourceSubnet != TargetSubnet - THEN BLOCK FAILOVER.
- AND
- MECM/SCCM triggers the maintenance window.
Test-SqlFailoverSafety.ps1runs.- If returns TRUE: Proceed with standard Cluster-Aware Update.
- If returns FALSE: Abort patch on this node. Alert SysAdmin. Do Not Move Data.
"Automation without Context is just automated destruction." - Gavin Dobbs