Share with together

独乐乐不如众乐乐

博客园 首页 新随笔 联系 订阅 管理

TITLE: Microsoft SQL Server Management Studio
------------------------------

Drop failed for User 'SQL2K5User'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=15138&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------



Solution:


1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) .
2) Delete the unwanted "userSchema".
3) Then, go back to the User(a folder like thing) and delete it.

ps: select * from sys.schemas where principal_id = user_id('user_name')

posted on 2007-08-13 11:25  寒枫  阅读(1644)  评论(0编辑  收藏  举报