SQL Server 2005 workaround for schema failure to delete user error 15138 _mssql2005

Source: Internet
Author: User
Tags microsoft sql server management studio sql server management sql server management studio

Microsoft SQL Server error: 15138 Delete failed for user, database principal has schema in this database, cannot delete

  Solution One
First delete the schema for this user, and then delete the corresponding user
Steps
1. SQL SERVER MANAGEMENT STUDIO Database security architecture, first delete the corresponding architecture

2. SQL SERVER MANAGEMENT STUDIO database Security user, delete the corresponding user

  Workaround Two
Execute the following SQL statement
ALTER AUTHORIZATION on SCHEMA::d b_owner to dbo;
And then manually delete it.





If you want to delete a user in the previous illustration if the user has an associated schema, then the schema must be reassigned to another user to be deleted.

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.