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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Novice needs help with orphan user login name

Author  Topic 

Cruiser859
Starting Member

45 Posts

Posted - 2007-04-05 : 14:37:12
Hi all

I 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=12615

I 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 Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Cruiser859
Starting Member

45 Posts

Posted - 2007-04-05 : 15:56:05
Tara

Thanks. 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' ]

Thanks

Stewart
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-04-05 : 15:58:57
Query Analyzer

Enterprise Manager is a GUI tool. To run commands, you use Query Analyzer.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -