User, group, or role & #39; test & #39; already exists in the current database, error 15023, exists15023

Source: Internet
Author: User

User, group, or role 'test' already exists in the current database, error 15023, exists15023
Directory

  • Directory
    • Error Message
    • Solution
      • -Method 1
      • -Method 2

Error Message

Solution-method 1

Create a user account without authorization, and then associate the account with the corresponding database user using the following SQL statement. This avoids re-authorization.
USE {target database}
EXEC sp_change_users_login 'Update _ one', '{username already exists in the target database}', '{username created }'

-Method 2

Before creating a user account (or authorization), delete the user account with the same name in the corresponding database.

The owner of the restored database is an isolated user.
Query analyzer and execute the following statement to find the isolated user
'Exec sp_change_users_login' Report"

Organized from Network

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.