19. April 2009 11:41
/
Philip Japikse
/
/
Comments (0)
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.
Happy Coding!
193e0224-b8de-49c1-bcc0-54fb9179fc0b|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :