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.