code_junkie

SQL server DB restored.Login failed error

Nov 13th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. exec sp_change_users_login @Action='Report'
  2.  
  3. exec sp_change_users_login @Action='update_one', @UserNamePattern='UserName', @LoginName='LoginName'
  4.  
  5. ALTER USER *userName* WITH LOGIN = *loginName*
  6. ALTER USER *userName* WITH DEFALT_SCHEMA = *schemaName*
Add Comment
Please, Sign In to add comment