Scripting Database Role

Last Post 05 Nov 2012 05:00 AM by gunneyk. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
samuelh
New Member
New Member

--
02 Nov 2012 08:12 AM
Hi,

SQL server (2008 R2 standard 64bit). I use database roles and I have assigned many rights to different objects. Examples (only read this table, only insert on one table, full rights to certain Schemas, execute certain sprocs etc....). I have more than 200 securables assigned to this Role.

How can I script this role, so that i can re-create it on a different server with all the securables to go along with it??

I really do not want to create the role from scratch and go through all the assigning of the rights to all these different objects.

many thanks in Advance!
rm
New Member
New Member

--
02 Nov 2012 11:26 AM
There's option of that when you script the db in ssms.
samuelh
New Member
New Member

--
02 Nov 2012 11:37 AM
Thanks for getting back to me on this.
Are you talking about the Advanced option when you script from database and select the role? To be specific, these options you're talking about are "Script Logins", "Script Object-Level permissions" etc.... None of these gave me the scripts for creating securables.
gunneyk
New Member
New Member

--
05 Nov 2012 05:00 AM
Do a BING search on Scripting Roles in SQL Server and you will find many hiots showing how to do this.


Acceptable Use Policy
---