To view if there are any orphaned users, run this query against the DB;
sp_change_users_login ‘report’
To fix;
sp_change_users_login ‘update_one’, ‘dbUser’, ‘sqlLogin’
|
|||||
|
|||||
|
|
How to fix Orphaned UsersTo view if there are any orphaned users, run this query against the DB; sp_change_users_login ‘report’ To fix; sp_change_users_login ‘update_one’, ‘dbUser’, ‘sqlLogin’ CommentsLeave a Comment |
Posted by kevriley on 31 August 2010
Although it is worth pointing out that this is a deprecated feature now. To fix, you should now use 'ALTER USER dbUser WITH LOGIN = sqlLogin'. However as discussed here (ask.sqlservercentral.com/.../identifying-orphaned-users), there is no longer a quick and easy way of identifying them in the first place.....
Posted by Favour on 3 November 2010
Thanks Kevriley, but is there a more easy way to identify an orphaned users and fixing them in 2008 R2? Please provide steps. Thanks.