Complete AI Training
Sign inGet my AI kit

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI agent for database administrators

Blocking and Deadlock Investigation Agent

A tested change that reduces deadlocks and blocking, with evidence

Blocking and Deadlock Investigation Agent: what goes in, what the agent does and what you get

What it does

Deadlocks and blocking chains disrupt users and are hard to reconstruct afterward. This agent reads deadlock graphs and blocking history and finds the statements and tables that appear again and again. It tests changes such as a consistent access order, a shorter transaction or a different isolation level in a copy of the database, and measures the number of deadlocks and the response times. Only changes that reduce blocking without hurting results are proposed. The administrator approves code or setting changes. Edge case: two jobs update the same two tables in opposite order, so the agent proposes a single order and tests it.

How it works

Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.

Start and resultWhat it doesA check on its own workWaits for your OKGoes back and retries
Yes, continueApprovedYes, continueNoNo 1 STARTS WHEN Deadlocks exceed the daily count 2 USES A TOOL Read deadlock graphs and blocking history 3 DOES Find the repeated statements and tables 4 DOES Propose changes such as consistent order or shortertransactions 5 USES A TOOL Test each change in a copy under load 6 CHECKS THE RESULT Do deadlocks drop and do results stay correct? If not: discard that change and test the next one. Backto step 4. 7 DOES Write the fix with before and after numbers 8 YOU APPROVE Administrator approves the code or setting change 9 USES A TOOL Apply in production in a window 10 CHECKS THE RESULT Do deadlocks stay low for a week? If not: review new graphs and test another change. Backto step 4. 11 RESULT Resolution report
Read the steps as a list
  1. Deadlocks exceed the daily count
  2. Read deadlock graphs and blocking history
  3. Find the repeated statements and tables
  4. Propose changes such as consistent order or shorter transactions
  5. Test each change in a copy under load
  6. Do deadlocks drop and do results stay correct?If not: discard that change and test the next one. Back to step 4.
  7. Write the fix with before and after numbers
  8. Administrator approves the code or setting changeThe agent waits here for your OK.
  9. Apply in production in a window
  10. Do deadlocks stay low for a week?If not: review new graphs and test another change. Back to step 4.
  11. Resolution report

How it decides

A pattern is the cause when the same statements or tables appear in most events. A fix is proposed when tests cut events with no wrong results.

  • Find patterns across several events, not one
  • Prefer code order changes to isolation changes
  • Require correct results in tests
  • Recheck for a week after the change

Make it yours

Every agent is a starting point. You choose these settings for your own situation.

  • Daily event count that triggers it (default: 10)
  • Isolation changes allowed
  • Test load size
  • Observation period (default: 1 week)

What keeps you in control

It always asks you first

  • Administrator approves code and setting changes

Hard limits

  • Never changes production code or settings itself
  • Never tests on live data

It stops when

  • Done: events stay low and the change is recorded
  • Stop: graphs are not captured

Set it up

We guide you through the set-up, step by step

Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.

10 minto set it up in your AI
5 AIsChatGPT, Claude, Copilot, Gemini, Grok
  • One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
  • The agent then walks you through connecting your own data, one source at a time
  • A downloadable copy with the flow chart, the rules and the full guide
Get access to this agent

An example run

What happensOver 3 days, 41 deadlocks involved an order update and an inventory update touching two tables in opposite order. The agent proposed one access order. In the copy under load, deadlocks fell from 38 per hour to 2 and totals matched. The administrator approved the change, and the next week saw 6 deadlocks in total.

More agents for database administrators