SQL Interview: 73 Orphaned users

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Administration Level: Medium
Question:
In SQL Server, what is an orphaned user?
How do users typically become orphaned?
Answer:
An orphaned user is one that appears in a database, but the server principal that they are linked to, does not exist.
A common cause of orphaned users is restoring a database from another server where SQL logins were defined, but those users do not exist on the server where the restore is performed.
2025-08-24