Incident Response

Need an Emergency DBA Right Now? Read This Before You Touch Anything

The database is down, the team is staring at error messages and nobody on staff is a DBA. What to do in the next 30 minutes, what not to do, and how to get urgent DBA help that actually helps.

· 12 min read · AG Data Team

If you are reading this because you typed "urgent DBA" or "need a DBA immediately" into Google, the database is probably on fire right now. So let's skip the introduction. Emergency DBA support is worth calling when your own team has stopped making progress, and it is worth the most when you have not made things worse before help arrives. That second part is what this page is about.

First: stop. Do not do these things

A database outage is bad. It gets much worse when, in the hour before help arrives, someone under pressure tries something they read on a forum. The PostgreSQL community wiki puts it plainly: "People often destroy potentially recoverable data by trying to repair it." Before anything else, rule these out:

The next 30 minutes: what actually helps

  1. Stop the bleeding, not the database. Pause batch jobs, cron tasks, ETL and anything else non-essential. Put the app into maintenance mode if you can. Less load buys time.
  2. If you suspect corruption, copy the files first. The PostgreSQL wiki's advice is to stop the server and take a file-system-level copy of the whole data directory before any repair attempt (PostgreSQL wiki: Corruption). The same logic applies to every engine. A disk or cloud volume snapshot also works. That copy is your undo button.
  3. Write down the timeline. When did it start? What changed in the last 24 hours: a deploy, a migration, a config change, a new index, an OS update, a cloud maintenance event? Very often the cause is somewhere in that list.
  4. Save the evidence. Database error log, the last few screenshots from monitoring (CPU, disk, connections, replication lag), the exact error text that users or the app see. Copy, don't paraphrase.
  5. Pick one person to talk to the outside world. Engineers fixing the problem shouldn't also be answering "is it back yet?" every five minutes.

If the database is slow rather than down, the fastest wins are usually boring: find the query or job that started hogging resources, and stop it. pg_stat_activity on PostgreSQL and SHOW PROCESSLIST on MySQL tell you who is doing what. Cancelling one runaway query is reversible. Most "clever" fixes aren't.

Situations where you really do need a DBA immediately

Not every incident needs outside help. A deploy that broke one query can usually be rolled back by your developers. These are the cases where waiting usually costs more than calling:

The backup point deserves a moment of honesty. If the restore has never been rehearsed, you don't really know whether you have a backup. We wrote about that in database backup and restore testing, but during an outage the useful question is simpler: where are the backups, how old is the newest one, and has anyone ever restored one?

How to hand over to an urgent DBA without losing an hour

When an outside DBA joins mid-incident, the first stretch of time goes on getting access and context. You can shrink that a lot by having this ready before the call ends:

How to choose emergency DBA support (ideally before you need it)

Search results for "emergency DBA" are full of agencies that will take your ticket at 3 a.m. and assign it to someone at 9. Ask these questions directly:

  1. Who picks up? A senior DBA, or a dispatcher who opens a ticket?
  2. What is the actual response time for a critical incident, at night and at weekends? Get it in writing.
  3. Which engines do they really run in production? "We support all databases" usually means "we support one well".
  4. How is emergency work billed? Hourly, a fixed incident fee, or included in a retainer? Avoid surprises when you are least able to negotiate.
  5. Do you get a written report afterwards: root cause, what was changed, what to fix so it doesn't happen again?

The best emergency DBA is the one who already knows your system. A provider who has your topology documented and access agreed in advance can start fixing within minutes instead of starting with "so what do you run?". How that looks from the inside is described in what a 15-minute database incident response actually looks like.

After the fire

Once the database is back, the temptation is to move on. Don't, at least not right away. Write the timeline down while people still remember it. Fix the monitoring gap that let the problem grow unnoticed. Test a restore. And decide whether you want to be doing an unplanned 2 a.m. search for a DBA again next time. For one manufacturing client we went from a failed on-premises Oracle server with no clear recovery path to a recovered system running on cloud infrastructure within 24 hours of first contact (case study). Getting there was possible because the team called early and had not tried to "repair" anything first.

Key takeaways

Emergency DBA Incident Response PostgreSQL MySQL
Work with us

Database down right now?

Call +371 20943683 or write to info@agdata.lv. Critical incidents get a first response from a senior DBA within 15 minutes, 24/7.

Get in touch More from the blog