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)
 Missing of dbo user login

Author  Topic 

venkath
Posting Yak Master

202 Posts

Posted - 2006-07-18 : 07:58:18
Hi all

i have restored a database from another server..
when i check the database users in that database..i could not find the database user dbo

what are the reasons for this...
how to fix this..

Thanks

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-07-18 : 08:06:16
EXEC sp_changedbowner 'DBO'
Go to Top of Page

venkath
Posting Yak Master

202 Posts

Posted - 2006-07-18 : 08:11:30
Hi when i run the above command, i am getting..

Server: Msg 15007, Level 16, State 1, Procedure sp_changedbowner, Line 33
The login 'DBO' does not exist.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-07-18 : 09:04:03
it's because restore will orphan the users assuming that the db logins are not present in the master database

so you just need to issue
exec sp_changedbowner 'sa' --not dbo

--make sure the other logins are there also with correct password and all, else you need to synchronize them

hope this helps...

--------------------
keeping it simple...
Go to Top of Page

venkath
Posting Yak Master

202 Posts

Posted - 2006-07-18 : 09:09:00
Thanks..
Go to Top of Page
   

- Advertisement -