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 2005 Forums
 SQL Server Administration (2005)
 Link users issues

Author  Topic 

CookiePT
Starting Member

4 Posts

Posted - 2008-09-16 : 06:24:52
Hi people!

Hope you can help me.

I do backup/restore many times in a week..sometimes 3/4 backups/restores per day.. since I installed SQL Server 2005 once a while my working DB lost the link to users.

I do backup my DB, do the restore and apply the "EXEC sp_change_users_login 'Auto_Fix'" script..for example tomorrow when I try to access to the DB my users are Orphaned again :(

Can any one explain this?
In SQL Server 2000 I never had this problem.

Thanks in advance!

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-16 : 08:45:38
After restore, You have to map Database users to Logins with:
sp_change_users_login 'update_one',--------.
It is same as SQL 2000.
Go to Top of Page

CookiePT
Starting Member

4 Posts

Posted - 2008-09-16 : 08:48:46
Thanks I'll try do that!

But..why in SQL 2000 I do Auto_Fix and it always works?

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-16 : 09:57:56
I have never used that. Can you Check booksonline for difference.
Go to Top of Page

CookiePT
Starting Member

4 Posts

Posted - 2008-09-25 : 10:03:55
I have tried to do that..unfortunately I still having the same problem.

But now I think I'm understanding what's happen..I have a lot of DB with the same users..when I do 'update_one' clause I lost my reference to other DB!?

It's correctly?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-25 : 10:07:42
Run sp_change_users_login 'Report' to find orphan users.

Update_one just maps your database user to Logins with Correct SID.
Go to Top of Page

CookiePT
Starting Member

4 Posts

Posted - 2008-09-26 : 09:43:50
Thanks sodeep.
Go to Top of Page
   

- Advertisement -