SQL Server error message: "The selected user has an object, so this user cannot be removed"

Source: Internet
Author: User
ArticleDirectory
    • 1. Open the Enterprise Manager, expand the server, right-click the local server, and choose properties:
    • 2. Select the regular window. The SQL Server proxy is automatically enabled:
    • 3. Repeat Action 1. Open the SQL Server properties (configuration) window and select the server settings window:
    • 4. Expand the database, view the database system table sysusers, right-click the table, and return all rows:
    • 5. Select the user to be added for restoration, find the relevant row, and right-click to delete:

Reposted from [http://tech.ddvip.com/2009-01/12310522771020.4.html]

SQL2000 cannot remove this user because the selected user has an object

After the SQL database is moved from one server to another, or the database is backed up, the SQL Server is uninstalled and re-installed, and then restored, the prompt "SQL2000 cannot remove this user because the selected user has an object" may be displayed. In this case, the user cannot be deleted, add a new user in security, and the user will be prompted to exist. What should I do?

Due to an error in the mssql200 database, I restored an original database to the current SQL statement. At this time, I came to the user and wanted to delete the restored user, the result shows that "the selected user cannot remove this user because the user has an object ":

If the user cannot be deleted, I am going to add the user in the system to this database to see if it is OK, but the following error is prompted (Microsoft SQL-DMO window ):

Error 21002: [SQL-DMO] user "liuhui" already exists.

Because of business requirements, I cannot create a new user for it or for another user. This database can only be used by this user, and the standard and Standard Server Format cannot be broken, it will not bring about the super trouble of future maintenance, and there is no way to ask for help from Google and Baidu. As a result, they let me down, and there is no way to ask for help from an experienced friend and solve the problem.

1. Open the Enterprise Manager, expand the server, right-click the local server, and choose properties:

Open the SQL Server properties (configuration) window

2. Select the regular window. The SQL Server proxy is automatically enabled:

OK

3. Repeat Action 1. Open the SQL Server properties (configuration) window and select the server settings window:

You can directly select and confirm the system directory.

4. Expand the database, view the database system table sysusers, right-click the table, and return all rows:

5. Select the user to be added for restoration, find the relevant row, and right-click to delete:

Select Yes

Go back to the user list and check whether there is any user. If there is no user, add the user corresponding to the database in SQL security. I added liuhui, no problem with the test website. Return to Action 3 and remove the system directory that is allowed to be directly modified on the selection.

The above text is from the Internet

==================================

Note: 2. Select the regular window and the SQL Server proxy will be automatically enabled.

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.