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)
 Login Name for dbo is blank

Author  Topic 

Redbyte
Starting Member

2 Posts

Posted - 2007-08-18 : 14:02:44
Hi all,
New to the forums, and not that good with SQL either

Im using a piece of third party software to create a database. Basically what it does is create a user in the Master DB and then uses this user as the dbo for the database it creates.
All works fine. However I also migrating an old database to this new install, by replacing the data and log file and restarting.

The problem im seeing is that when I restart the dbo no lomger has a value for Login Name. This is causing issues as all the upgrade scrips that we need to run reference the dbo user , and they cant fing a login user becasue its blank.

Can someone point me in the right direction to allow to add the login name back into the dbo user for my database.

Many thanks

RB

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-18 : 14:05:37
you have to differentiate between a login and a user.

for example: an sa login has a dbo user mapped to it in sql serrver.
so what is your login and your user?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-08-18 : 17:18:07
Since login that maps to dbo of source db doesn't exist in target server, you can remap dbo to whatever existing login with sp_changedbowner.
Go to Top of Page

Redbyte
Starting Member

2 Posts

Posted - 2007-08-27 : 12:51:44
quote:
Originally posted by rmiao

Since login that maps to dbo of source db doesn't exist in target server, you can remap dbo to whatever existing login with sp_changedbowner.



Many thanks to you both
RB
Go to Top of Page
   

- Advertisement -