Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restore / User already exists
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Recovery
Miscellaneous
Thread ID:
00809201
Message ID:
00809328
Views:
28
>>Take a look at the sp_change_users_login system stored procedure. You can use this stored procedure to relink the database users to the new logins.<<

Thank you, Mike. I've searched BOL for some help with invoking it. Cannot find anything on it. Thru looking at the code and trial and error, I was able to get the following to seem to work by executing the following from the query analyzer (message said 1 orphaned user was fixed):

sp_change_users_login 'UPDATE_ONE', 'closing', 'closing'

However, I did the above after adding the login 'closing' under security (expecting the closing user in the database needed to have a closing user to link to). This must not have been the right thing to do. Now, I cannot add the database to this user (or add the user to the database). When attempting the former, I get the following error when trying to bring forth the properties of the user 'closing'

"Error 21776:[SQL-DMO] The name 'closing' was not found in the users collection. If the name is a qualified name, use [] to separate various parts of the name, and try again.

I've tried running the sp_change_users_login on the master database also, but this did nothing.

Thanks for any more hints...

Del
Del
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform