views:

259

answers:

2

I am trying to drop one of the role in my SQL Server database. I dropped all the members from the role and when i tried to drop role i got this error message:

Msg 15138, Level 16, State 1, Line 13
The database principal owns a schema in the database, and cannot be dropped.

Does anyone know why? I checked the Owned Schema and it only had check sign in its own name.

+1  A: 

You cannot drop a database principal that owns a schema. You have to transfer the schema ownership to some other database principal or drop the schema before you can drop the database principal.

Aaron M
A: 

I thought to drop role, i just have to drop role members and i can drop the role. But i was wrong. Could anyone tell me what's the standard way of dropping role in database?

sanjeev40084