Home Forums SQL Server 2005 Administering How to sync users and logins in SQL2005 after restore RE: How to sync users and logins in SQL2005 after restore

  • This code snippet might help:

    use DatabaseNameHere

    go

    EXEC sp_change_users_login 'REPORT'

    EXEC sp_change_users_login 'UPDATE_ONE','user','user'

    This worked to resynch orphaned logins for me. Just put your database name in line one above and your orphaned user name in place of the user in the last line of the script.

    Cheers

    M 🙂