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
 Other SQL Server Topics (2005)
 Database owner changes when attaching database

Author  Topic 

Carat
Yak Posting Veteran

92 Posts

Posted - 2007-06-26 : 08:31:37
I have a database with 'sa' as the database owner.
When I detach the database and than attach it, I get the following error: "The proposed new database owner is already a user in the database". When I look in my Management Studio, I see that my database is attached and it has my domain name as database owner.

So it seems like that whenever a database is attached, SQL Server changes the database owner to the user who is attaching the database.

Am I right or is it something else?

One more question, is it good or bad to put 'sa' as the database owner for all my databases?

Thanks.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-26 : 13:51:00
Yes, that right. Who should be db owner depends on which sql login you like dbo to map to.
Go to Top of Page

steve1980
Starting Member

1 Post

Posted - 2007-08-20 : 21:09:52
It tells you that the attached failed when in fact it has not! Why give the error in the first place when it just confuses the users? Go figure.
Go to Top of Page
   

- Advertisement -