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 full…
Written by
-
DBA Scripts: Get Replication Status
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability Transactional replication runs quietly in the background for years without incident, right up until a subscriber falls behind or a publication stops distributing changes, and by then the business impact (a reporting database showing stale data, a downstream system missing updates)…
Written by
-
DBA Scripts: Get Replication Agent Status
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability Publications Look Fine. Are the Agents Actually Keeping Up? Replication Status tells you what’s published and subscribed. It doesn’t tell you whether the jobs actually moving that data, the Log Reader Agent and the Distribution Agent, are keeping up, or whether…
Written by
-
DBA Scripts: Get Last Node Blip
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability When Did This FCI Last Move, and Why On a Failover Cluster Instance (FCI), every node blip, planned or not, causes SQL Server to restart on whichever node picks it up. That restart resets sqlserver_start_time, which makes instance uptime itself a…
Written by
-
DBA Scripts: Get Mirroring Endpoint Health and Status
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability Still Running Database Mirroring? Here’s What to Check Database Mirroring has been deprecated since SQL Server 2012, Always On Availability Groups are the supported replacement for any new deployment. But deprecated doesn’t mean gone: plenty of instances still run it, migrations…
Written by
-
DBA Scripts: Get AG Failover Readiness and Readable Secondary Usage
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability Would a Failover Actually Succeed Right Now, and Is Anyone Using the Secondary? AG Replica Role and Synchronization State tells you the current health of every replica. This post answers two sharper, more specific questions on top of that: if 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
- Set the Default Database for a SQL Server Login
- SQL Server High CPU: What to Check First, in Order
- Cannot Connect to SQL Server: The Checks in the Order That Finds It
- Cumulative Wait Stats Lie: Measuring Waits Over an Interval
- SQL Server Differential vs Log Backup: Which One Restores What, and How the Chain Breaks
- SQL Server MAXDOP and Cost Threshold: What To Set, and Why 5 Is Not a Recommendation
- Backups & Recovery (17)
- DBA Scripts (150)
- High Availability (HA) (12)
- Installation & Configuration (45)
- Maintenance (24)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (19)
- Storage & Capacity (14)
- T-SQL Fundamentals (11)
- Troubleshooting (65)
- Wait Types (235)