Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Cruiser859
Starting Member
45 Posts |
Posted - 2007-04-05 : 14:37:12
|
Hi allI know this is answered here but I have no clue what it is saying or where and how to run the script. http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=12615I moved a backed up copy of my database from one server to another. I restored it but there is now an orphan user.I ran into this problem about 3 years ago and know the fix was a lot simplier that the above reference.Please help me understand how to get the user login name restored.Thanks very much. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-05 : 14:39:19
|
Just run sp_change_users_login against the one userid (@action = Update_One). Chadmat's stored procedure is when you have multiple orphaned users. Check SQL Server Books Online for syntax.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
|
|
Cruiser859
Starting Member
45 Posts |
Posted - 2007-04-05 : 15:56:05
|
TaraThanks. But they fail to tell you what program to use to run sp_change_users_login.Is this accomplished in Enterprise or QA?sp_change_users_login [ @Action = ] 'action' [ , [ @UserNamePattern = ] 'user' ] [ , [ @LoginName = ] 'login' ] [ , [ @Password = ] 'password' ]ThanksStewart |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-05 : 15:58:57
|
Query AnalyzerEnterprise Manager is a GUI tool. To run commands, you use Query Analyzer.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|