cuiyi's blog(崔毅 crazycy)

记录点滴 鉴往事之得失 以资于发展
数据加载中……

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

Use UI to configure database, also checked some items in schema;
while delete this user, an error encounter like this: The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)
 
but use the below script, I successfully removed;
SELECT s.name
FROM sys.schemas s
WHERE s.principal_id = USER_ID('YourUserID');

find all the schemas to be removed
ALTER AUTHORIZATION ON SCHEMA::YourSchemaName TO dbo;

posted on 2013-07-11 17:34 crazycy 阅读(373) 评论(0)  编辑  收藏 所属分类: DBMS


只有注册用户登录后才能发表评论。


网站导航: