Groups | Blog | Home
all groups > sql server (alternate) > november 2004 >

sql server (alternate) : sp_changedbowner gives error 15110


sam777t NO[at]SPAM yahoo.com
11/12/2004 5:59:26 PM
My platform is NT2000 and my database runs on a SqlServer 2000.
I have a database where some of the user tables are owned by the
user dbo. I would like to change the user from dbo to another
account. When I execute the sp_changedbowner to change the table owner
I get the following error message:

Msg 15110, Level 16, State 1, Procedure
sp_changedbowner, Line 47 The proposed new database owner is already a
user in the database.

Does anyone know why we get this error message ? What is the best
approach
to fix or get around this problem ? I have seen several posts on this
subject
in this news group that address this issue but I am not sure which
approach
is the recommended or the safest approach.

Thanks,
Quah Siew Thiam
11/13/2004 11:36:05 AM
hi, I feel that you should not change the owner but leave it as "dbo", =
otherwise, it would be quite a hassle for developers to know the owner =
during the coding, if there's any change to the owner in future, the =
program has to be modified...

Quah


[quoted text, click to view]
Dan Guzman
11/13/2004 3:57:33 PM
It seems you are confusing the database owner with the object owner. To
change the owner of an object, use sp_changeobjectowner.

sp_changedbowner is used to specify the *database* owner, which determines
the login that is mapped to the 'dbo' user. The database owner cannot be an
existing database user and this is probably the cause of your error message.

--
Hope this helps.

Dan Guzman
SQL Server MVP

[quoted text, click to view]

AddThis Social Bookmark Button