The database owner has an architecture in the database and cannot delete the solution.

Source: Internet
Author: User
Tags management studio microsoft sql server management studio sql server management studio
Q: I have attached an MDF Database Under 2005 to 2000, but cannot delete users in the original database. I attached an MDF Database Under 2005 to 2000, but cannot delete users in the original database. After a prompt is displayed, there is a user in the original database. Now I want to delete this user and create a new user, and assign the new database permission. This user cannot be deleted.
The prompt is as follows:
Title: Microsoft SQL Server Management studio ------------------------------ failed to delete *** for the user. (Microsoft. sqlserver. SMO) for help information, click: http://go.microsoft.com/fwlink? Prodname = Microsoft + SQL + server & prodver = 9.00.1399.00 & evtsrc = Microsoft. sqlserver. Management. SMO. exceptiontemplates. failedoperationexceptiontext & evtid = Delete + User & linkid = 20476
------------------------------
Other information: An exception occurred when executing a Transact-SQL statement or batch processing. (Microsoft. sqlserver. connectioninfo) ------------------------------ the database entity has a schema in the database and cannot be deleted. (Microsoft SQL Server, error: 15138) for help information, click: http://go.microsoft.com/fwlink? Prodname = Microsoft + SQL + server & prodver = 09.00.1399 & evtsrc = MSSQLServer & evtid = 15138 & linkid = 20476 -------------------------- what does this mean? Can I delete this user ??

Reply: First Delete the architecture of the user, and then follow the steps to delete the corresponding user
1. SQL Server Management studio -- database -- Security -- Architecture, first Delete the corresponding Architecture

2. SQL Server Management studio -- database -- Security -- user, other methods for deleting the corresponding user: When sql2005 deletes the user, "the database subject has a structure in the database, "cannot be deleted" solution -- execute the following SQL statement alter authorization on Schema: db_owner to DBO; -- then manually delete it.

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.