Change login for dbo with sp_changedbowner fails | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Change login for dbo with sp_changedbowner fails


Using sp_changedbowner to change the login user for dbo fails on a user database. The current login is no longer a valid NT login. When trying to change login to another valid user with sp_changedbowner an error message occurs that says the new login is already a user in the database. Someone know what the problem is?
From BOL login cannot become the owner of the current database if it already has 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. You need to first take the new owner out of the database, then you will be able to run the change owner command.

That worked!
Thank you for your help.
]]>