SQL Server 2008 appears that the database principal owns the schema in the database and cannot be deleted. (Microsoft SQL Server, error: 15138)

Source: Internet
Author: User

When using SQL Server to Do data mining, the user can not access the problem, so to the corresponding database add a login user Zhang, and give the appropriate permissions. When debugging, found that there is still a problem, so want to delete this user Zhang, and create a new user. An error message appears :


The database principal has a schema in the database and cannot be deleted. (Microsoft SQL Server, error : 15138)

Solution:
Delete the schema for this user, and then delete the corresponding user

Specific steps:
1, the corresponding database --"Security --" framework, first delete the corresponding framework
2, the corresponding database --"Security --" users, delete the corresponding user


The procedure is as follows:


Create user Zhang:




Delete User error:




Delete the appropriate schema:




User Deletion succeeded:




SQL Server 2008 appears that the database principal owns the schema in the database and cannot be deleted. (Microsoft SQL Server, error: 15138)

Related Article

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.