Skip to main content

What are Lock Waits and Blocking Chains? How do you debug them?

Mid MS SQL
Quick Answer Lock waits happen when one transaction needs a lock already held by another. A blocking chain is multiple transactions queued behind the head blocker. Debug using sys.dm_exec_requests, sys.dm_os_waiting_tasks, or the blocking report in Query Store. The head blocker is always the root cause รขโ‚ฌโ€ fix that transaction first.

Answer

Blocking occurs when a session holds a lock required by another. Debugging tools include:

  • sp_whoisactive
  • sys.dm_exec_requests
  • Extended events
  • Activity Monitor
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice