Remapping logins after restore

  • We had a login with a mapped user for a particular database. We dropped that database (this is development environment, of course), and restored a copy of production which also has same user name.

    Now, if developers want to connect to database from their application, they get an error. In SSMS, I could find that login - it was not checked - and I tried to check it to the database. However, I got an error stating that this user already exists in the database. I had to drop the user from database, and after that I could map the login. But dropping is not a solution, there must be more elegant way for it. Is there any sp_ for that ? I tried sp_validatelogins but this is not what I want.

    Thanks

  • hello..

    try this one sp_change_users_login, look for it in books on line.

    ..>>..

    MobashA

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply