sql2005 remap login return error

But I dont know what is wrong with my T-sql statemnet below .

Sp_change_users_login @action='report',@loginname='Ben10'


Sp_change_users_login @action='Update_One',@loginname='Ben10'

Both turn with error below

Msg 15600, Level 15, State 1, Procedure sp_change_users_login, Line 53
An invalid parameter or option was specified for procedure 'sys.sp_change_users_login'.
Who is Participating?
You have to specify both the login and username for updating

Sp_change_users_login @action='Update_One', 'Ben10', 'Ben10'

Reporting doesn't work if any parameter is specified. It requires all to be NULL. So, following will work:-

Sp_change_users_login @action='report'
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.