Friday, September 30, 2011

Database owner is already a user in the database

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

If you are getting above error message while changing the database owner. ‘DBuser’ cannot become the owner of the current database if it already has access/dbo access to the database through an existing alias or user security account within the database. To avoid this, drop the alias or ‘user’ within the current database first. here is the solution.


Use Database_Name;
sp_dropuser ‘DBUser’
sp_changedbowner ‘DBUser’