Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Looking for a SQL Script to script out security Expand / Collapse
Author
Message
Posted Tuesday, April 23, 2013 9:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, November 20, 2013 8:10 AM
Points: 2, Visits: 27
Good afternoon... I am trying to see if anyone has a script that I could run before restoring a database that would generate the SQL to be run after the restore that would create all the database level security as well as any server level (View Definition, Show Plan, etc.) that an account may have.

We are often asked to restore DB's from one environment to another and the security between the two environments is different. I have a script that works okay now, but it is missing the security like ViewDefinition, ShowPlan, etc.

This would need to be able to run on SQL 2005 sp3 or newer and just be TSQL.

Thanks in advance
Post #1445540
Posted Wednesday, April 24, 2013 6:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 12:31 PM
Points: 10,910, Visits: 12,545
Here are a some links to scripts in the SSC scripts library that should at least get you started:

http://www.sqlservercentral.com/scripts/75191/
http://www.sqlservercentral.com/scripts/64793/
http://www.sqlservercentral.com/scripts/Permissions/76450/




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1445907
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse