How to fix SQL Server orphaned users
09 Aug 2010When you restore a database, often the UserSID is different between the database and the server users, so you end up with Orphaned Users.
To resolve this run the following when connected to the restored database.
That will return a list of all orphaned users in the selected database.
If you already have a login id and password for this user, fix the orphaned user by:
If you want to create a new login id and password for this user, fix it by :