January 19, 2009 at 1:16 pm
/*************************************************
* DATABASE ORPHAN USER *
*************************************************
* fix a user if they had access on the database *
* then the user was dropped and added back in *
*************************************************/
EXEC [sp_MSforeachdb] 'print ''Updateing: [?] ''
exec [?]..sp_change_users_login ''autousefix_fix'', ''SQLSVC'''
July 22, 2009 at 2:18 am
Ur code in the provided link gives me error as below.
Please advice
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '-'.
July 23, 2009 at 4:00 pm
I can't think how it would fail, try taking out the commented section and running it, don't forget to rename SQLSVC to the user you think is orphan'ed.
July 24, 2009 at 10:03 am
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply