When you try to revoke the rights of a login on a database the following error can appear:

Cannot drop the user 'dbo'

 

 

Solution

This happens because the dbo user is mapped to that particular login. 

 

You need to change the database owner to a different login:

USE DATABASE_NAME;
ALTER AUTHORIZATION ON DATABASE::DATABASE_NAME TO [sa]


After this the login will not be mapped anymore in that database with dbo user:

 


No feedback yet

Leave a comment


Your email address will not be revealed on this site.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)