close

Solution:

use mydb
go

-- Report current database users
EXEC sp_change_users_login 'REPORT'

EXEC sp_change_users_login 'Auto_Fix','my_db_user',NULL,'my_db_pwd'
>>
Barring a conflict, the row for user 'my_db_user' will be fixed by updating its link to a new login
The number of orphaned users fixed by updating users was 0.
The number of orphaned users fixed by adding new logins and then updating users was 1.


EXEC sp_change_users_login 'update_one','my_db_user','my_db_user'

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 DanBrother 的頭像
    DanBrother

    DanBrother的部落格

    DanBrother 發表在 痞客邦 留言(0) 人氣()