Triage a slow SQL Server during an incident
Quando usar: Users are reporting timeouts and you need to know what's blocking whom in the next 60 seconds.
Pré-requisitos
- PerformanceMonitor app installed and connected to target server — Download from the GitHub releases and point it at your monitoring DB
- Target login has VIEW SERVER STATE — GRANT VIEW SERVER STATE TO [monitor_login]
- MCP registered with your client — claude mcp add --transport http --scope user sql-monitor http://localhost:5151/
Fluxo
-
Get the health overviewRun the health check — any red flags on waits, blocking, or memory pressure right now?✓ Copiado→ Short list of elevated metrics
-
Drill into the top offenderIf blocking is the top issue, show me the head blocker chain and the SQL text of the blocking session.✓ Copiado→ Specific SPID + query text
-
Get a recommendationShould I kill that SPID, wait it out, or is there a missing index that would prevent this? Be specific.✓ Copiado→ One clear recommended action with rationale
Resultado: A diagnosed incident with a specific next action — kill, wait, index, or escalate — in under 5 minutes.
Armadilhas
- Killing a blocker that was about to commit can cause more damage — Always ask for how long it's been running and whether it holds an open transaction before killing
- Metrics from the monitoring DB lag the real server by the collector interval — For live view, use the 'current state' tools rather than aggregated history