Tag: SQL Server Monitoring
-
How to Right-Size SQL Server Database Files
Auto-growth is not the problem. Unplanned, reactive growth is. When a file is undersized SQL Server extends it repeatedly under load, every extension is a pause, and if those pauses land in the peak hour they show up as latency, I/O pressure and the occasional application timeout. Right-sizing is about making growth rare, predictable and…
Written by
-
How to Check Blocking SPIDs in SQL Server
Blocking is one of the most common causes of performance issues in SQL Server. When one session holds a lock on a resource and another session needs that same resource, the second session waits. If that wait persists, users experience slowness. Understanding how to quickly identify blocking SPIDs is a core DBA skill. This guide…
Written by
-
Check When SQL Server Was Last Restarted
Knowing when SQL Server last restarted is one of the simplest checks a DBA can perform, and one of the most useful. It immediately answers questions around patching, failovers, configuration changes, and unexplained behaviour. Before assuming anything else, confirming uptime is always worth doing first. This post shows the most reliable way to check SQL…
Written by
-
DBA Scripts: Check AG Replica Role and Synchronization State
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability Is Every Replica Actually Ready to Take Over A failover just happened or the AG dashboard has gone red, and you need to know which replica is primary now and whether every secondary is connected and in sync. Run this on…
Written by
-
DBA Scripts: Check Always On Availability Group Latency
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: High Availability How Far Behind Is Each Database, Really A readable secondary is serving stale data, commits on the primary have slowed, or a failover is about to depend on a replica you have not checked. Run this on the primary: it returns…
Written by
-
DBA Scripts: Get Last Database Backup Times
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Backup & Recovery Checking the last backup times is one of the first things worth doing when you sit down at a SQL Server instance, whether it’s one you’ve owned for years or one you inherited an hour ago. Before making changes, running…
Written by
-
Get Last Database Restore Date and Time in SQL Server
Knowing when a database was last restored is useful during incident response, audits, and general environment validation. This is not about backup schedules or restore progress. It is one historical check that answers one question, when was this database last restored, and the query below answers it for every database on the instance. Show Last…
Written by
- SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
- View the Definition of a Stored Procedure in SQL Server
- TempDB Is Full or Still Growing: Find What Is Using It, Right Now
- SQL Server Service Will Not Start: Error 17113, 17058, 1067 and Where the Real Reason Is
- How to Move TempDB Files in SQL Server
- RAND() vs NEWID() in SQL Server
- Backups & Recovery (17)
- DBA Scripts (151)
- High Availability (HA) (12)
- Installation & Configuration (49)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (16)
- T-SQL Fundamentals (15)
- Troubleshooting (94)
- Wait Types (235)