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)
 Attach & Security

Author  Topic 

dtanis
Starting Member

14 Posts

Posted - 2004-05-10 : 15:01:18
Hello!
I detacted and attached a db from one server to another. Both SQL 2000, but different OS. Inside the db there a standard login used in one of my applications. The login does not seem to like the transition, but I am having trouble correcting it. It does not appear at the server level or db level...but it is part of the public Role at the db level. When I try to create it at the db level, it says that it already exists (which it doesn't) - but then suddenly appears (yes - I did it three times to make sure - deleting the login each time). If I try to add it at the db level, it get a message stating that it already exists. However, it does not appear in the list, so I can not add to other roles besides public. Any thoughts are welcome!! Thanks! David

MuadDBA

628 Posts

Posted - 2004-05-10 : 15:33:47
try sp_change_users_login stored procedure....you have an orphaned user, it should be able to fix it.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-10 : 15:44:45
Users get stored in two locations, in master database in sysxlogins table (which is the table that you are viewing when you look at logins in Enterprise Manager) and also in sysusers in the user database that the user has access to. sp_change_users_login will fix the mapping between the two tables. Use the UPDATE_ONE option.

Tara
Go to Top of Page
   

- Advertisement -