April 23, 2013 at 9:52 am
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
April 24, 2013 at 6:37 am
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
Consultant - Straight Path Solutions
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
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply