Category: High Availability (HA)
-
SQL Server Replication Monitoring Scripts
This is the set I reach for when replication starts acting up. Latency creeping, agents stuck, or subscribers falling behind — these queries cut through the noise fast. I’ve used them in production environments for years. What’s Inside If you run transactional replication, keep these handy. They save time when things go sideways. For the…
Written by
-
Understanding SQL Server AG Latency (AAG Latency Explained)
As a production SQL Server DBA, one of the fastest health checks I run on an Always On Availability Group is a latency check. AG latency is the delay between a transaction committing on the primary replica and that same transaction being hardened and redone on a secondary replica. If the secondary is behind, it…
Written by
-
Troubleshooting Database Mirroring Issues in SQL Server
Database Mirroring is deprecated, but you will still see it in many production environments. It was officially marked deprecated in SQL Server 2012 and has remained in that state for well over a decade. In my own career as a DBA, it has been “deprecated” the entire time, yet still widely deployed and fully supported.…
Written by
-
Creating SQL Logins on an Availability Group (AG) Environment
In an Availability Group, the databases fail over. Your SQL logins do not. For Windows domain logins, the SID is owned by AD, so you just create the login on each replica and it syncs up. For SQL logins, the SID is generated inside SQL Server. If the SID differs between replicas, the database user…
Written by
-
Using PowerShell to Get Last SQL Failover Time
When reviewing availability events on SQL Server, one of the first questions is often: Did the cluster move, and when? This post shows how to use PowerShell to retrieve the last Windows Failover Cluster role movement for a SQL Server instance by querying cluster event logs. It’s a fast, reliable way to confirm node-level failovers…
Written by
-
Script: Check AG Replica Role and Synchronization State
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. Is Every Replica Actually Ready to Take Over An Availability Group only protects you if every secondary replica is actually connected, synchronized, and healthy at the moment you need it. A replica that quietly dropped its connection hours ago looks identical to a…
Written by
-
Script: Check Always On Availability Group Latency
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. How Far Behind Is Each Database, Really Availability Group Replica State answers whether a replica is connected and generally healthy. It doesn’t answer the database-level question that actually matters during an incident: how much data is sitting in the send queue right now,…
Written by
Start Here
- DBA Scripts: The Complete Guide
- Run a Full Health Check
- DBA Scripts & Tools
- SSMS: The Complete Guide
- Wait Types Library
The Pillars
Blog Categories
- Backups & Recovery (5)
- DBA Scripts (147)
- High Availability (HA) (7)
- Installation & Configuration (16)
- Maintenance (4)
- Migration & Upgrades (1)
- Monitoring (6)
- Performance Tuning (5)
- Security (Encryption & Permissions) (3)
- T-SQL Fundamentals (11)
- Troubleshooting (23)
- Wait Types (235)
Latest Posts
- Compatibility Levels: What Actually Changes When You Bump It
- SQL Server Management Studio (SSMS): The Complete Guide
- SQL Server Collation: Case Sensitivity and the Cross-Database Trap
- SQL Server Isolation Levels (and When to Reach for RCSI)
- DBA Scripts: Get Database Summary
- DBA Scripts: Get Database Inventory
Blog Tags
Access (4) Always On Availability Groups (4) Auditing (7) Backups (6) Blocking (4) Blocking Locking (6) Collectors (7) Database Backups & Recovery (8) Database Backups and Recovery (5) Database Maintenance (7) DBA Tools (24) Disk Space (5) Extended Events (8) Features (6) High Availability (6) Indexes (7) Installation (7) Inventory (8) Jobs (3) Maintenance (7) Migration (15) Monitoring (27) Performance (21) Performance Troubleshooting (9) PowerShell (4) Query Behaviour (5) Security (10) SQL Agent (5) SQL Scripts (17) SQL Server Administration (10) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (3) SQL Server Management Studio (SSMS) (6) SQL Server Monitoring (7) SQL Server Networking (9) SQL Server Security (7) Storage and Capacity (7) T-SQL (10) Temp DB (3) Tracing (7) Transaction Logs (4) Troubleshooting (24) Windows Server (4)