When a Database Alert Fires at 2 AM
It’s 2 AM. A database alert fires. The on-call engineer wakes up, opens a laptop, connects to the VPN and starts the same routine every experienced engineer knows: check the sessions, check the locks, check the slow queries, check the connections, rule things out one by one.
I’ve been that engineer. Over two decades, from Unix servers to AWS, Azure and Oracle Cloud, the tools have changed many times. That first hour of digging hasn’t.
In our first post, The Five Levels of Cloud Operations, we called Level 4 Agentic: an agent investigates the issue, shows its evidence and recommends a fix, and a person approves it. In From Manual to Automated, we showed the automation that has to come first. This post is about what Level 4 actually looks like on the night it matters.
How an AI Agent Investigates a Database Alert
Here is a real investigation from an agent we run on our own systems, in watch-only mode.
A database alert came in: a session was “idle in transaction”. The agent picked it up by itself. It worked out what the alert meant: a session was sitting idle while still holding locks. Then it decided which checks to run, and ran them, all read-only: database version, lock waits, idle sessions, the longest-running query, vacuum activity and connections.
In under two minutes, it had the answer. An application had updated a row in the orders table and then gone quiet without committing. It was still holding the lock, and other sessions were stuck waiting behind it. The agent named the exact session and the statement it had run.
Two more things stood out to me.
It said how serious it was. Only a small share of connections was in use, and nothing else was blocked. That tells the engineer whether to wake up the whole team or handle it calmly.
It said what it could not prove. It didn’t know whether the application was missing a commit or waiting on an outside step, and it said so. No guess. That one sentence is why engineers start to trust an agent.
Then it recommended the fix and stopped. A person decides whether to apply for it.
What an AI Agent Should Do
From building and running this, here’s my list:
- Start on its own. The investigation begins when the alert arrives, not when someone logs in.
- Choose its checks. Like a senior engineer, it decides what to look at next based on what it has found.
- Show every piece of evidence. Each conclusion links to the check that supports it.
- Say how serious it is. Impact matters as much as cause.
- Admit what it doesn’t know. “Evidence or no finding” should be a rule, not a slogan.
- Recommend, in plain English. The engineer should understand the finding in one read.
- Record every step. If you can’t audit it, you can’t trust it.
What an AI Agent Should Not Do
- Change your systems without approval. At Level 4, the agent proposes and people dispose. Read-only access is a design choice, not a limitation.
- Guess to fill a gap. A confident wrong answer at 2 AM is worse than no answer.
- Send your secrets to a model. Passwords and keys should be masked before anything reaches the AI.
- Live outside your cloud. Your operational data should stay in your own environment.
- Pretend to be Level 5. Handing over action comes later, rule by rule, once the agent’s record on your own systems has earned it.
Why Human Approval Still Matters in Agentic Operations
Level 5, where agents handle routine issues within limits you’ve agreed, is a real destination. But you don’t get there by switching it on. You get there by watching the agent at Level 4, checking its findings against what your engineers would have concluded, and widening its scope only where it has been right, again and again.
That is how we run our own agent today. It investigates, explains and recommends. Our team decides.
See It Live on 19 November
Join our webinar, The Journey to Autonomous Cloud Operations, on Thursday 19 November 2026. I’ll walk through the five levels, help you see where your team stands, and show an AI agent investigating a real issue on a real cloud, live.