Fifteen common DBA interview questions
- Describe your backup strategy. How do you know backups work?
- Full, differential and incremental backups — differences?
- How does point-in-time recovery work?
- What are RPO and RTO?
- Synchronous versus asynchronous replication?
- How does automatic failover work, and what can go wrong?
- A query suddenly became slow. How do you investigate?
- How do you read an execution plan?
- How do you find and fix blocking and deadlocks?
- How do you choose indexes, and when do you remove them?
- How do you secure a database?
- How do you upgrade a major version with minimal downtime?
- The database disk is almost full. What do you do?
- How do you plan capacity?
- Managed cloud database versus self-managed?
Backups and recovery
- Full backups copy everything; differential copies changes since the last full; incremental copies changes since the last backup of any type.
- Point-in-time recovery: restore a full backup, then replay transaction logs up to the moment before the incident.
- RPO (recovery point objective) is how much data you can afford to lose; RTO (recovery time objective) is how long recovery may take. Both drive the strategy.
- Testing: regular automated restores to a separate environment, with checks that the data is complete — an untested backup is a hope, not a backup.
Replication and availability
| Option | Trade-off |
|---|---|
| Synchronous replication | No data loss on failover; adds write latency |
| Asynchronous replication | Low latency; possible data loss if the primary fails |
| Read replicas | Scale reads; replication lag affects freshness |
| Automatic failover | Fast recovery; risk of split-brain without proper fencing |
Performance tuning
For a sudden slowdown: check what changed (deploys, data volume, statistics, configuration), look at current activity for blocking and long transactions, compare the execution plan with a known good one — stale statistics or parameter-sensitive plans are frequent culprits — and check resource saturation. In execution plans, look for full scans on large tables, large estimated-versus-actual row mismatches, expensive sorts and nested loops over big inputs. Add indexes that match filter and join columns, and remove unused ones, because every index slows writes. See PostgreSQL interview questions.
Security and upgrades
- Least-privilege roles; no shared admin accounts; separate application credentials.
- Encryption in transit and at rest; secrets in a vault; auditing of privileged actions.
- Network isolation: databases not exposed to the internet.
- Upgrades: test on a restored copy, use replication-based or blue–green upgrades to cut downtime, keep a rollback plan, and schedule with stakeholders.
Incident scenario: disk almost full
Stop it getting worse first: identify what's growing — transaction logs held by a stuck replication slot or long transaction, temporary files, a runaway table — and address the cause. Extend storage if possible. Avoid deleting database files directly. Afterwards, add alerting at sensible thresholds and capacity forecasts so it doesn't recur. This structure — stabilise, diagnose, fix, prevent — applies to most DBA scenarios. See DBMS interview questions.
Managed cloud databases
With managed services, DBA work shifts from installing and patching to design, cost and reliability: choosing instance sizes and storage types, configuring automated backups and cross-region replicas, tuning parameters within what the provider allows, monitoring with provider metrics, and planning maintenance windows. Interviewers ask what you'd still be responsible for — schema design, query performance, access control, restore testing and capacity — because the provider runs the hardware, not your workload.
Practising
Interviewers follow up on the most specific thing you say, so rehearse the second question as well as the first. CoPilot Interview, a free AI interview assistant, runs database administration mock interviews with follow-ups and produces a report of likely next-round questions. Prepare a real incident story with timeline, impact, root cause and the prevention you put in place.
Disclosure: CoPilot Interview is our product, so weigh what we say about it accordingly. Everything else on this page applies whichever tool you use, or none.
Frequently asked questions
What questions are asked in a DBA interview?
Backup and recovery strategies, RPO and RTO, replication and failover, performance tuning and execution plans, blocking and deadlocks, indexing, security, upgrades, capacity planning and incident scenarios.
What is the difference between RPO and RTO?
RPO is the maximum acceptable data loss measured in time; RTO is the maximum acceptable time to restore service.
How do you troubleshoot a slow query?
Check what changed, look for blocking and long transactions, compare the execution plan with a good one, refresh statistics if stale, check resource saturation and adjust indexes or the query.
How do you know your backups work?
By restoring them regularly to a separate environment and verifying the data, ideally automatically, and timing restores against your RTO.
Practise on real interview questions
Run 145 real interview questions across 10 tracks, answer out loud and see a structured answer to compare with yours. Free, no signup.
Try a practice question