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)
 DBO login after DB restore .

Author  Topic 

admin001
Posting Yak Master

166 Posts

Posted - 2003-06-07 : 02:49:54
Hi ,

I have restored some databases from one server say server A to another server B through bak files . But when I check the users in the restored database of server B , it does not show user name as dbo , login name as 'sa ' with database access as permit .

While on the source server A it shows and has to be there .
The strange thing is that , it does not display for some databases while for some DB's they have a DBO . Any problems could have happened during the restore process ? In fact the restore process went smoothly without any issues . I am not creating any database on server B prior to restore .
I am unable to fugure this specific problem and would require your suggestions .

Thanks

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2003-06-07 : 12:46:05
After a restore like this, it is always a good practice to run the following procs:

1. sp_change_users_login
2. sp_changedbowner

sp_changedbowner will fix the issue you are having. Check both of these out in BOL for syntax, etc.


-ec

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2003-06-07 : 18:45:58
You should use my script. You can find it in the scripts forum.

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2003-06-07 : 22:10:07
nice script, here is the link: http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=12615


-ec

Go to Top of Page
   

- Advertisement -