users exist on dev database

  • Hi All,

    once again i need your expertise advise. On regular basis i have to restore databases from production to development for developers. most of us know how to fix orphaned users but my issue is developers don't have access to prod so their user accounts doesn't exit on prod but they does exist on dev database servers. when i restore database from prod to dev on top of the existing datbase in dev i lost all the users that had access to that particular database in dev. to avoid that before restoring i have to script all the users in that particular database and create them after restore. but now i wrote few stored procdedures for developers which they can execute via command line and restore databases without asking me. but issue is those users that were there in dev.

    any idea how i can reterive them after restore..

    hope my question make sense.

    please advise

    Thanks

  • "after" is always to late.

    We create windows groups for that get the needed access auth on our dev instances. A devs login will only need to be added to that windows group to have the auth.

    After restore, these groups are added to the db. Because of naming conventions for this windows groups, this is an easy task.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • <-- i saw what you did there lol

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Part of your restore process will have to add the users back to the database.

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

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