All jobs / Database administrator / Security
Database administrator interview question · 3–5 years
How do you rotate the application’s database password without downtime?
The strongest answer
Create a second credential or role, deploy the application with the new one while both are valid, verify no connections use the old one, then revoke it — and automate this via a secrets manager
Why it works
Exactly — overlap, verify, revoke, automate.
What a good answer covers
- Two valid credentials overlap.
- Verify before revoking.
- Automate with a secrets manager.
- Service accounts rotate too.
Answers that fall short
- Close, but not the strongest: Change the password and redeploy the application immediately afterwards
The gap between change and redeploy is an outage for every new connection. - Weak: Change the password during a maintenance window when the application is stopped
A window turns routine hygiene into a planned outage. - Red flag: Passwords for service accounts do not need rotating
Service credentials leak in logs and repositories more than any other kind.
Who gets asked this
More Security questions
- On an instance you have inherited, permissions are granted directly to dozens of named accounts, each set…
- At three in the morning the application account starts running large SELECTs over the customer table from an…
- A new market requires that customer data stays within its borders. Impact on the database platform?
- An auditor asks you to prove who can read personal data and who has read it. How do you answer?
- What is the difference between a server-level login and a database-level user, and why does it bite you after…
- A developer asks for the application account to have superuser or db_owner rights “so nothing blocks the…
- The whole team logs in with one shared admin account. What is wrong, and what do you propose?
- Security asks for “the database to be encrypted”. What do you actually put in place?