Skip to main content

How do you detect blocking issues and understand who is blocking whom?

Expert MS SQL
Quick Answer Use sys.dm_exec_requests to see currently waiting sessions and what they're waiting for. sys.dm_os_waiting_tasks shows the blocking chain รขโ‚ฌโ€ who is waiting on whom. The session at the head of the chain with no wait is the blocker. That's the transaction to investigate รขโ‚ฌโ€ long-running or uncommitted transactions are the usual culprit.

Answer

Blocking is identified using:

  • sys.dm_exec_requests โ€“ blocking_session_id
  • sys.dm_os_waiting_tasks โ€“ wait chains
  • Activity Monitor โ€“ high-level visualization

Blocking chains often originate from a long-running transaction holding critical locks.

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