解决删除用户时报错的问题:Msg 15138, Level16, State 1, Line 1 The database principal owns a schemain the database

原文链接:http://www.cnblogs.com/ricksun/articles/3091268.html
USE mydata;
 SELECT s.name
 FROM sys.schemas s
 WHERE s.principal_id= USER_ID('developer');
 
--将db_owner Schema的Owner改为dbo
ALTER AUTHORIZATION on SCHEMA::db_owner TO dbo;
 
---再次查询用户test6拥有的Schema为空
 SELECT s.name
 FROM sys.schemas s
 WHERE s.principal_id= USER_ID('developer');
 
 --删除用户test6
 DROP USER developer

 

转载于:https://www.cnblogs.com/ricksun/articles/3091268.html

上一篇:libstdc++适配Xcode10与iOS12


下一篇:集成开发环境PL/SQL Developer v13.0新功能(一)——编辑器功能增强