Add Login Name to a DB User?

  • I'm setting up a fail over server using backup/restore to

    copy the databases over from the live SQL server. When I

    restore a DB, all the Database Users are restored, but the

    login names are blank. The last thing I want to do is re-

    create the users and have to set the permissions up

    again. Is there a way I can add/edit the Login Name for a

    DB User where it is currently set to <null>?

    Thanks in advance,

    Nic

  • Run sp_change_users_login to fix. Unless you match the SID in sysxlogins match the original server you'll have to do this each time you do a restore on the other server.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thanks, that did the trick.

    Regards,

    Nic

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

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