I have dropped a SQL Server Windows Login. I then ran the below code to check for orphaned database users. However, the database user corresponding to the dropped Windows login does not appear as an orphaned user.
Why would this be?
EXEC sp_change_users_login @Action = 'Report';
Best Answer
Thomas has explained why that stored procedure isn't capturing orphaned Windows users, but here is how you can check:
If you need to do this for all databases, you can generate this dynamically, e.g.