Site icon Database Tutorials

User, group, or role already exists in the current database

 

You moved the database to another instance and created a new login for this database instead of moving the login from the old instance to the new instance. I recommend that you read my article “How To Move Logins To Another Instance(sp_help_revlogin)”.

You may receive this error when you want to authorize the login that you created for the database that you transferred. The reason for the error is that there is a user with the same name as the login you created in the database. This user in the database is known as orphaned user.

The error is as follows;

Create failed for User ”.

User, group, or role already exists in the current database

 

There are several ways to fix this error.

1) Delete the corresponding user from the Users tab under Database and re-authorize:

For the authorization process, I suggest you read my article “How To Create a Login On SQL Server(Manage Logins)“.

2) Pairing the Login and the user:

3) Pairing the Login and the user:(This is old method before SQL Server 2008)

Exit mobile version