Friday, February 26, 2010

Drop User: The database principal owns a schema in the database, and cannot be dropped

This is a common error when dropping a user from a database when it owns some schema. Usually you can use SSMS UI to uncheck the user from the owned schema.

After locating the owned schema by the user, the correct sql statement to change the owner of a schema is:

alter authorization on schema::schema_name to user_name

No comments:

Post a Comment