Sunday, 26 October 2014

How to fix orphaned SQL users

-- tells you the orphaned users
EXEC sp_change_users_login 'report'
-- to fix if you already have the server login:
EXEC sp_change_users_login 'Auto_Fix', 'enter your username here'
-- to fix if you don't already have the server login:
EXEC sp_change_users_login 'Auto_Fix', 'user', 'enter your login here', 'enter your password here'

No comments:

Post a Comment