All jobs / Database administrator / Security
Database administrator interview question · 3–5 years
On an instance you have inherited, permissions are granted directly to dozens of named accounts, each set slightly different.
Why does that matter, and how do you fix it?
The strongest answer
Nobody can answer who can do what, and leavers get missed — so I define a role per job, grant only to roles, migrate the existing grants, and review membership regularly
Why it works
Exactly — roles turn a pile of grants into something reviewable, and reviewable is what both an auditor and an on-call engineer need.
What a good answer covers
- Grant to roles, not people.
- Roles map to jobs.
- Migrate grants before revoking.
- Review membership on a schedule.
Answers that fall short
- Close, but not the strongest: I would create roles and put people into them so permissions are at least consistent
Right answer; say what it buys — one place to review, and removing a leaver in a single step. - Weak: It is untidy but harmless, as long as each grant is the minimum that person needs
Even a set of minimal grants is unauditable when it is per person, and the risk is what nobody notices. - Red flag: I would revoke all the existing grants and let people ask for whatever they find they have lost
Revoking first and waiting for complaints is an outage with extra steps; migrate grants into roles, then remove.
Who gets asked this
More Security questions
- 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?
- HR asks who changed a salary value last Tuesday. Can you answer, and what would you set up?