onsdag 24 februari 2010

Orphaned users in MSSQL

After a restore of database the users often is orphaned.

To solv this I usually run the following two queries:

1. sp_change_users_login Report - query to find the users
2. sp_change_users_login auto_fix, <orphaned_user_name> - query to fix the orphaned user

More information found here:
http://msdn.microsoft.com/en-us/library/ms175475.aspx

Inga kommentarer:

Skicka en kommentar