Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Database User and Roles Script Extract Needed Expand / Collapse
Author
Message
Posted Wednesday, April 3, 2013 7:12 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, May 17, 2016 5:03 PM
Points: 1,070, Visits: 1,104
logicinside22 (3/28/2013)
Hi
I am looking for same script to generate script for User DB roles . Can you share if you have it now?
Or if anyone have it can share ?
Thanks


I think the script I have posted here should work. I just created an empty DB, added a table, added a new role, and issued a "grant select on dbo.table1 to test_role" and then executed the script.

The output I got back was under object level permissions for that role:
-- [-- OBJECT LEVEL PERMISSIONS --] --
GRANT SELECT ON [dbo].[table1] TO [test_role1]



Check that out and let me know if something is missing there.

Cheers,
Steve
Post #1438633
Posted Sunday, November 29, 2015 4:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, March 26, 2016 11:48 PM
Points: 6, Visits: 31
this will script out everything

http://dbasqlhelp.blogspot.in/2015/11/extract-all-database-permissions-before.html


remove the last insert which will fix orphan users
Post #1740918
Posted Thursday, January 28, 2016 4:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, March 26, 2016 11:48 PM
Points: 6, Visits: 31
https://gallery.technet.microsoft.com/Extract-Database-dfa53d5a

that might help you
Post #1756307
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse