Dropping a user which owns a schema will result in the error message “The database principal owns a schema in the database, and cannot be dropped”.

To solve this you can assign the schema back to its base principal with the ALTER AUTHORIZATION message, or it can be moved to another user/principal.
If for example user Test1 owns the db_owner schema and you want to drop Test1 but don’t have another user to move the schema to you can type:

ALTER AUTHORIZATION ON SCHEMA::db_owner TO db_owner
(or for example db_datawriter if that was the case and so on)

If you wanted to move the schema to another user the syntax would be:

ALTER AUTHORIZATION ON SCHEMA::<theSchema> TO userName

13 Responses to “Drop User: The database principal owns a schema in the database, and cannot be dropped”

  1. Thanks very much for this helpful bit of information. :)

  2. Awesome, thanks!

  3. Thanks for the great post.

  4. nice suggestion

  5. Thank you very much!!!

  6. Thanks! My problem is solved!I searched for hours and could not find this solution.

  7. Great, just what I needed.

  8. Thanks for sharing

  9. Perfect. Thanks man!

  10. Very usefull solution… thanks

  11. Thanks, just what I needed

  12. Thank a lot , you just saved me…Great Job

  13. 10 puntos master

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>