19. April 2009 11:41
When you need to drop a user from a SQL Server Database (maybe you entered the name wrong, it needs to be changed, whatever), quite often you will run into an error due to schema ownership.
â€œThe database principal owns a schema in the database, and cannot be dropped.â€
Try as you might, the GUI (Management Studio) isnâ€™t going to help you out on this one. You need to transfer the schema that matches the user name to another principal (like dbo) so that you can delete the user.
ALTER AUTHORIZATION ON SCHEMA::[username] TO [dbo]
Then you can delete the user.