Database Administration — Sat Jan 31

← Home | ← database-admin

DBA Toolkit SQL Server Blocks Waits locks

Sat Jan 31
#sql-server #dba #monitoring #troubleshooting #sessions #blocking #waits #locks #backups #always-on #performance #tool-kit

What This Query Does (And Why Every DBA Should Know It)

In your first few days as a SQL Server DBA, you will almost certainly run into this problem: users saying “the database is slow” — and nine times out of ten, it’s blocking.

This query is your quick way of cutting through the noise. It shows you which sessions are currently being blocked, who is blocking them, which database it’s happening in, what they’re waiting on, and how long they’ve been stuck there. By ordering the results by wait time, it puts the worst pain at the top so you can immediately see where the real problem is.

Block, lock and waits Requests Script

Blocking, Waits and Locks.sql
    Loading…
  

Gareth Winterman