📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

What is the blocked process report in SQL Server, how do you set it up on SQL Server and Azure SQL Database, and how do you read one?

Capturing historical blocking with the blocked process threshold and the blocked_process_report Extended Events event, and reading the blocked and blocking process sections.

Mid-Level Theory Intermediate blocked-process-report blocking extended-events monitoring sql-server

🎯 Key points

  • Set 'blocked process threshold (s)' with sp_configure (e.g. 10-20 s)
  • Capture sqlserver.blocked_process_report with an Extended Events session
  • Azure SQL Database: database-scoped XE session; threshold is managed by the platform
  • XML has blocked-process and blocking-process sections
  • Read waitresource, isolationlevel, trancount, inputbuf and status
  • A report repeats every threshold interval while the block lasts
  • Tools: Michael J. Swart's Blocked Process Report Viewer, sp_HumanEventsBlockViewer

⏱ 30-second answer

The blocked process report is an Extended Events (or trace) event raised when a session has waited on a lock longer than the blocked process threshold. On SQL Server it is off until you enable it: sp_configure 'blocked process threshold (s)', 15; RECONFIGURE; then capture sqlserver.blocked_process_report in an XE session to a file target. In Azure SQL Database you create a database-scoped XE session; the threshold is managed by the platform. Each report documents both sessions: the blocked-process section (the waiter) and the blocking-process section (the cause). Read waitresource (what is locked), isolationlevel (serializable or repeatable read holds locks longer), trancount, status (sleeping means an app left a transaction open) and inputbuf (the last statement each session sent). It turns 'it was slow at 2 am' into evidence, at the cost of a small, continuous XE overhead.

🔍 What the interviewer is checking

Checks the candidate can capture blocking that has already ended, not only live incidents.

More in Transactions and Locking

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me