| Time | AG | New Role | Type | Source | Event ID | Message |
|---|---|---|---|---|---|---|
| 2026-07-15 02:00:11 | AG_PROD_01 | PRIMARY | Planned | ApplicationLog | 1480 | The local availability replica of availability group 'AG_PROD_01' is going online... manual failover initiated by CONTOSO\dba_team. |
| 2026-07-15 02:00:14 | AG_PROD_01 | SECONDARY | Planned | ApplicationLog | 1480 | The local availability replica of availability group 'AG_PROD_01' is changing roles from primary to secondary... |
| 2026-06-02 14:22:03 | AG_PROD_01 | PRIMARY | Forced | ApplicationLog | 19407 | The lease between availability group 'AG_PROD_01' and the Windows Server Failover Cluster has expired... |
| 2026-06-02 14:22:03 | AG_PROD_01 | PRIMARY | Automatic | ApplicationLog | 1480 | The local availability replica of availability group 'AG_PROD_01' is going online... automatic failover, WSFC-initiated. |
| 2026-05-28 09:00:00 | AG_PROD_01 | PRIMARY | RoleStartTime | - | Approximate current-role start time from SQL Server DMVs (fallback source when no matching event log entry exists). |
Sources: Windows Application Event Log (EventID 1480 role changes, EventID 19407 lease expiry) and, with -IncludeClusterLog, the WSFC cluster operational log (EventID 1641). A 19407 lease-expiry event within 5 minutes of a 1480 role change is classified Forced rather than Automatic. Default lookback: 30 days.