SQL2008 - How to Script a Database Role?

Last Post 28 Jan 2011 12:03 PM by rm. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
NJSQL
New Member
New Member

--
28 Jan 2011 07:35 AM

Need to copy an existing database role on a selected database.   The setup is very complicated and would take a while to mimic,  with the few changes it needs.

Is there a way to output the existing role to a script, allowing modification and loading under a different name?

rm
New Member
New Member

--
28 Jan 2011 08:58 AM
Yes, you can script it in ssms. Right click on the role and go to script database role as -> create to.
NJSQL
New Member
New Member

--
28 Jan 2011 09:25 AM

  That only creates a blank role without the specific permissions,  ex:   

CREATE ROLE [GIS_EDITOR] AUTHORIZATION [dbo]

I need all the "Securables" behind the role,  the specific permissions granted.    I have a role with over 200 securables.

 

rm
New Member
New Member

--
28 Jan 2011 12:03 PM
Take look at sp_helprotect in books online.
You are not authorized to post a reply.

Acceptable Use Policy