sql2005 remap login return error

Posted on 2012-09-08
Last Modified: 2012-09-20
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'.
Question by:motioneye
    1 Comment
    LVL 25

    Accepted Solution

    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'

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now