Generally to resolve the orphan users issue, I follow the below steps:
(1) sp_change_users_login 'report' -> Execute the query in the database.
(2) sp_change_users_login 'update_one', 'login_name','user_name' ===> to match sid value of syslogins and sysusers.
But, if I have many orphan users available in a database, then manually executing step 2, will consume more time. Instead of this, do we have any single command which we can execute to fix all the 'orphan users' together? Please suggest..