Linking ALL Users to Login after restoring a SQL Server 2005 database

后端 未结 6 2279
长发绾君心
长发绾君心 2021-01-30 03:50

(Note this question asks about linking ALL Users, unlike the possible duplicate that asks about linking a single user)

I wish to move a database between two servers, I

6条回答
  •  误落风尘
    2021-01-30 04:42

    If:

    EXEC sp_change_users_login 'Auto_Fix' , 'TheUserName';
    

    Doest't work, try this:

    EXEC sp_change_users_login 'Auto_Fix', 'Username', NULL, 'p@ssword123'
    

    I found it here: http://dbadiaries.com/using-sp_change_users_login-to-fix-sql-server-orphaned-users

提交回复
热议问题