Orhpaned Users

  • I have a process to restore a Production Database to the Development SQL Server. This is done via a restore of the Database. Potentially, there may be several users in the Production Database that do not have Logins on the Development SQL Server and therefore they are orphaned users in the Database on the Development Server.

    Some time ago, I heard about a System Stored Procedre that corrects orphaned users in a Database. Does anyone know what it is?

    If not, what is the best way to deal with this situation?


    Kindest Regards,

  • That would be sp_change_users_login.

    You still need to have the logins on the development server though.

     

    --------------------
    Colt 45 - the original point and click interface

  • Ok thanks.


    Kindest Regards,

  • As part of your process, you may want to think about adding a DTS/Transfer Login task from production to deveolopment. After restore, use the sp_change_users_login to link the users to the logins.

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

  • There is also a GUI tool  mapsid.exe to map orphaned users and you can delete the users you do not want to have access to production

     

    Mike

Viewing 6 posts - 1 through 5 (of 5 total)

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