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.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 script out user and their permissions

Author  Topic 

jpotucek
Constraint Violating Yak Guru

273 Posts

Posted - 2009-10-28 : 10:37:17

I need to take a backup of all of the databases in one of my production SQL Server 2005 Instances and restore them to a DEV instance - and then posssibly restore the DEV instance back to it's original state at some point.

I have some users that are the same in prod and dev and some that exist in one and not the other.

Before I restore prod to dev, I will create the users in DEV that exist in production but not in dev.

As for the other users, I am looking for a way to script out the existing permissions for each user. This way once I restore prod to dev, I can drop their 'prod' permissions and create their 'dev' permissions.

is there a way to easily do what I am trying to do??

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-10-28 : 12:18:54
I assume you're putting the dev database on a separate instance to the prod database
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-10-28 : 12:21:33
When you restore the database onto a dev enviroment from a backup off a live prod database it doesn't overight the security in the dev enviroment
Go to Top of Page
   

- Advertisement -