SQL: Cannot drop the user dbo

Published by

Posted on April 17, 2011

Cannot drop the user ‘dbo’. (Microsoft SQL Server, Error: 15150)

Problem: trying to unmapped a user to a database , you may receive the above error message. This is because the dbo user is assigned the login of the user you are trying to remove. You will need to run the following query to change the user

exec sp_changedbowner ‘new user’

or if this is part of Active directory

exec sp_changedbowner ‘domain\user’