nav-img
Advanced

Failed to Bind a New User to an RDS for SQL Server DB Instance That Was Recovered from Backups

Scenarios

An RDS for SQL Server DB instance is recovered from backup, and binding a newly created user to this instance fails. An error message "User, group, or role 'ecology' already exists in the current database" is displayed.

Possible Causes

After the DB instance recovers, the user actually does exist but is not displayed on the console.

Solution

Run the following commands as user rdsuser to connect to the DB instance and change its username (ecology is just an example):

use [DBName];
Exec sp_change_users_login 'AUTO_FIX','ecology';