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

http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/

SELECT s.name
FROM sys.schemas s
WHERE s.principal_id = USER_ID('mytaxes');

ALTER AUTHORIZATION ON SCHEMA::db_owner TO dbo;

Then it can be dropped.

猜你喜欢

转载自kaqi.iteye.com/blog/1622339