HA/DR Awareness

Status: Reviewed (deep-dive v1)
Stack: PowerShell (topology discovery) → SQL health/procs → Blazor Server UI
Depends on: SQL-01 Inventory; SQL-02 Backup (DR floor); SQL-08 Patching (AG patch order)
Goal: Know what HA/DR you actually have, whether it’s healthy, and what the first moves are in a failover — without a novel on every Microsoft HA feature.


Why this next

Patching and backups assume you know primary vs secondary and how you’d recover. HA/DR awareness closes that loop. Document reality first (AG, log shipping, mirroring legacy, backup-only DR) — don’t invent Always On where none exists.


What “good” looks like


Patterns (pick what you deploy)

Pattern Typical use Ops focus
Backup-only DR Smaller / cost-sensitive SQL-02 restore drills
Always On AG HA + readable secondaries Sync health, failover mode, backup preference
Log shipping DR with delay OK Copy/restore lag, alert on job fail
FCI (instance cluster) Instance-level HA Quorum, shared storage, failover history
Mirroring (legacy) Only if still present Plan migration; don’t expand

Rick confirms which patterns exist; collectors discover and flag unknowns.


Checklist — collect

Always On (when present):

Log shipping:

FCI / WSFC (PS):

Backup-only:

Emit instance/AG keys + CollectedAt. Read-only — no failover from collectors.


Checklist — store (SQL + procs)

Table Purpose
dbo.HaTopology Pattern per instance/DB group
dbo.AgReplica Replica health snapshot
dbo.AgDatabase Per-DB sync state
dbo.LogShipStatus Lag / job status
dbo.HaIncident Failover events / tickets (manual + detected)

Procs:


Checklist — present (Blazor)


Operator runbooks (short)

A — AG unhealthy / not synchronizing

  1. Confirm which DB/replica; check suspend reason
  2. Network / endpoint / service account / disk (SQL-06)
  3. Don’t resume blindly if data divergence risk — follow change control
  4. After fix: wait for synchronized; document in HaIncident

B — Planned AG failover (overview)

  1. Backup Green; app owners notified; jobs quiesced (SQL-04)
  2. Prefer manual failover path for sync commit; respect async (possible data loss — explicit approval)
  3. Post: listener routing, Agent jobs on new primary, backup preference, patch notes (SQL-08)
  4. Failback only when healthy + approved

C — Backup-only DR invoke

  1. Declare RPO loss window
  2. Restore full/diff/log chain to DR instance (SQL-02)
  3. Smoke test + redirect apps
  4. Schedule reverse protection

D — Log shipping lag

  1. Check copy/restore Agent jobs (SQL-04)
  2. Disk on secondary; network share
  3. Catch-up or rebuild secondary if broken

Tie-ins


Common failure patterns

Symptom Likely cause
Databases Not Synchronizing Suspended, network, redo blocked, disk full
App can’t connect after failover Listener DNS/SPN/firewall; connection string
Data loss surprise Async commit failover without approval
Jobs fail on new primary Jobs not set for failover / missing operators

Permissions notes


Done definition


Next candidate

Alerting & runbooks — wire severity/ack across SQL-01..09 findings.


SQL Dude — SQL-09 HA/DR Awareness v1