Scenario: I was transferring a database (mick) from one SQL2005 server to an SQL2012 server. During the mapping of a user login (mick) I got the following the error:
sp_change_users_login 'AUTO_FIX', 'USER_NAME'
In my case:
sp_change_users_login 'AUTO_FIX', 'mick'
You should see the following output:
The row for user 'mick' will be fixed by updating its login link to a login already in existence.
The number of orphaned users fixed by updating users was 1.
The number of orphaned users fixed by adding new logins and then updating users was 0.