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 Development (2000)
 Change dbo login name

Author  Topic 

jrockfl
Posting Yak Master

223 Posts

Posted - 2005-02-24 : 12:28:50
I have 2 users listed
Name | Login Name
-------------------
dbo | this is blank
myusername | myusername


How can I make dbo I have myusername for the login name?

This is causing problems with my DTS transfer, its creating duplicate tables.

1 with dbo.tablename and another with myusername.tablename

This is how I need it...

Name | Login Name
-------------------
dbo | myusername

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-02-24 : 12:34:55
from query analyzer, connect to your database.

exec sp_changedbowner 'myusername'



-ec
Go to Top of Page

jrockfl
Posting Yak Master

223 Posts

Posted - 2005-02-24 : 12:37:24
I tried that, I get this...

The proposed new database owner is already a user in the database.
Go to Top of Page

jrockfl
Posting Yak Master

223 Posts

Posted - 2005-02-24 : 12:39:07
I tried to drop the user, but he owns stuff. how can i find out what he owns? then i change him and kick him out
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-02-24 : 12:44:06
look up sp_changeobjectowner in BOL

Go to Top of Page
   

- Advertisement -