In SQL Server 2005, if you try to drop a database user by right-clicking the user name and clicking Delete, you may encounter an error as follows.
“The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)”

The reason for this is that in SQL Server 2005, if a user is associated with a Schema, then that user has to be first replaced by another user in the schema before you can drop the user from the database.
In SQL Server 2005 Management Studio, expand the node
Database > yourdatabasename > Security and then click Schemas. On the right pane, you will see a name value pairs list of the schemas and the corresponding owners.
For one or more of the schemas, you should see the user you are trying to drop listed as the owner. For each of these schemas, do the following.

Hi,
This solution is for users. If we got the same error with database roles, how can we fix this?
Thank you
Gud one dear,
Looks so simple , if not done it created huge problems
Thanks, it’s work for me
Thanks for your solution. It works well for me :)
Thank you very much! :)
If you are unsure of the schema (in my case it wasn’t the schema i had a problem with, but db_owner) – then run this query and look at the SCHEMA_OWNER column to look for the user you’re trying to delete. Then change the owner of that schema to something (dbo for example) and you will be able to delete the user.
select * from INFORMATION_SCHEMA.SCHEMATA
Great post this, thanx for the help guys.
Thanks… this worked for me as well.
it worked for me, thanks a lot