I can’t drop a database user: The user owns one or more databases

This was frustrating me a bit, as I wish SQL Management Studio would just prompt me to remove myself as owner from those db’s and let me drop. Nope. It doesn’t.

So, what to do? Well, I used management studio to select another one of my accounts. I get the awesome message of “The proposed new database owner is already a user or aliased in the database.”. So, no go there.

I then realized I never mapped SA to these db. Nice and simple. Assign each db owner to SA, then your done.

Or run this script and keep changing the db name. Probably could automate this more by querying the db’s and looping.


alter authorization on DATABASE::[MyDBName] to [SA]

Hope this helps someone.

Happy Coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.