• GilaMonster - Sunday, January 13, 2019 12:56 PM

    You do step 2 once. Not every time.
    And you generate the login script from prod, not test. You want the logins on test to have the same sids as they have on prod.

    Then each time you want to refresh, you take a backup from prod and you restore it to test.  If you want the users to have different DB permissions you then need to run a script to change the permissions after a restore.
    SSIS and jobs are server components, not in a DB. Do you also want those on  test?

    Sorry If I misunderstood but we have different permission level in Prod and test and we don't want any permission privileges from production to test as test has different permission level so if  from step 2 (generate before refresh and run in TEST that script in TEST after Refresh)?
    If i generate Login script from Production before refresh and run into TEST after refresh then TEST will have Production SID?