PulseDBAi
Back to Blog
SQL ServerBlockingPerformance

SQL Server Blocking Chains: Auto-Detection and Auto-Fix

March 15, 2026

Why Blocking Chains Are So Painful

A blocking chain occurs when one SQL Server session holds a lock that other sessions need to proceed. As the holder lingers, waiters pile up, and before long you have dozens of sessions blocked behind a single rogue transaction. The application slows to a crawl, timeouts cascade, and your phone starts ringing.

The insidious part is that blocking chains are often transient. By the time a DBA SSHs in, opens SSMS, and runs their diagnostic queries, the blocking session has frequently finished — and all that remains is a pile of failed transactions and confused application logs. Reproducing the issue the next day to understand the root cause is frustrating at best.

How PulseDBAi Detects Blocking via sys.dm_exec_requests

PulseDBAi polls sys.dm_exec_requests and sys.dm_os_waiting_tasks at sub-minute intervals (down to 30 seconds on Enterprise plans) and constructs a real-time blocking graph. When a chain is detected, the platform immediately captures:

  • The full chain topology: head blocker, intermediate blockers, and leaf waiters
  • The blocking SQL text and query plan for the head blocker
  • Session details: login, host, application name, open transaction count, last batch time
  • Lock types held and requested (shared, exclusive, intent, update)
  • Wait time per node in the chain

This snapshot is timestamped and preserved in the audit log regardless of whether the chain self-resolves. That means your post-incident analysis always has the data it needs, even when the blocking clears on its own.

The AI Approval Gate

Before PulseDBAi takes any action, it runs the captured context through an approval pipeline. The AI evaluates:

  1. Chain duration and growth rate — Is the head blocker still active? Has wait time crossed your configured threshold (default: 60 seconds)?
  2. Safety classification — Is the proposed kill a background process, an application service account, or a human user session?
  3. Confidence score — Does the head blocker look like a runaway transaction, or could this be a legitimate long-running operation (batch ETL, index build)?

If the confidence score exceeds your configured threshold, PulseDBAi executes the remediation autonomously: it issues a targeted KILL on the head blocker, writes a full audit entry, and dispatches a notification with the before/after blocking graph.

If confidence falls below the threshold — for example, when the head blocker is a known ETL process running during a maintenance window — PulseDBAi halts and escalates. The on-call DBA receives a fully-formed incident report with the proposed kill command, risk assessment, and a one-click approval button. No SSMS required.

Verification and Post-Action Audit

After any autonomous action, PulseDBAi re-queries sys.dm_exec_requests to confirm the blocking chain has cleared. It logs the resolution time, the freed wait time across all unblocked sessions, and any follow-on alerts triggered by the liberated workload (for example, a CPU spike as queued queries resume).

The audit log entry includes the full decision trace: what was detected, what the AI evaluated, the confidence score, which policy rule authorized the action, and the outcome. This record is searchable, exportable, and retained per your plan's retention policy — critical for compliance teams and post-mortems alike.

Getting Started

Enabling blocking detection in PulseDBAi requires read access to the DMVs (VIEW SERVER STATE permission) and the ALTER ANY CONNECTION permission for autonomous kill actions. Setup takes under ten minutes, and you can start in monitor-only mode — all detection and alerting, zero autonomous actions — before gradually enabling remediation as confidence builds.