Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cwalston
Starting Member
25 Posts |
Posted - 2007-08-21 : 01:06:25
|
Hi All!!I get tasked with refreshing my DEV and QA environments from time to time from Prod dumps and always have to manually extract the users and permissions (DB Artisan) before the load to preserve the users and perms. I would like to automate this process and was wondering if there is a way to have a SQL Job output a file that I could osql in after a load. Or I could throw the info into a table and generate some dynamic sql after the load to add the users...Oh the possibilities!! I would really appreciate and advice on how others handle this issue!Thanks! |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-08-21 : 23:04:30
|
If you mean remap db user to sql login, you can script that and run it after restoring db. |
 |
|
cwalston
Starting Member
25 Posts |
Posted - 2007-08-22 : 00:12:24
|
No. We have different users that have access to DEV/QA and don't have access to Prod. So when the Prod dump overlays the DEV/QA database, it now has the Prod users (orphaned) and the DEV/QA users and their permissions are gone. |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-08-22 : 22:28:45
|
Then don't think you can generate dynamic sql since dev/qa user names are not in prod db as you said. |
 |
|
|
|
|