Assign a login to a user created without login (SQL Server)
Solution 1:
sp_change_users_login
is deprecated.
Much easier is:
ALTER USER usr1 WITH LOGIN = login1;
Solution 2:
I found that this question was still relevant but not clearly answered in my case.
Using SQL Server 2012 with an orphaned SQL_USER this was the fix;
USE databasename -- The database I had recently attached
EXEC sp_change_users_login 'Report' -- Display orphaned users
EXEC sp_change_users_login 'Auto_Fix', 'UserName', NULL, 'Password'