The database principal has a schema in the database and cannot remove the workaround

Source: Internet
Author: User

A dedicated administrator was established on the server database because the test wanted to delete it, but always prompted that the user has a schema that cannot be deleted, and the schema shows that db_owner cannot be changed, I am using sqlserver2008. Deleting a database user in SQL Server2000 is as simple as deleting it directly or using the drop User command, but the direct operation in SQL Server2008 is not possible because the schema is treated as an entity in SQL Server 2008. So to delete the user, you need to first delete the schema owned by the user or change the owner of the schema. Otherwise, the database principal has a schema in the database and cannot be deleted.

I did a search. know that each database user corresponds to a system login account, and each schema can only be given to one user. So directly delete the user's schema is not possible, then I will create a new login, and in the user mapping to the db_owner schema to pay him, and then can delete the previous user.

"Perfect World http://www.23cat.com/Contents_51864.html"
"Timestamp Xian http://www.23cat.com/Book_51960.html"

The database principal has a schema in the database and cannot remove the workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.