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 ««12

Permission scripting over all databases Expand / Collapse
Author
Message
Posted Monday, February 6, 2012 9:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, September 15, 2014 5:31 AM
Points: 139, Visits: 4,617
I found that this script doesn't write down schema permissions.

You might check the following: http://www.sqlservercentral.com/scripts/Security/71562/
Post #1247469
Posted Thursday, December 13, 2012 9:10 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, September 11, 2014 8:30 AM
Points: 247, Visits: 797
For the new user, I'd it to generate a create user statement:

USE [dbname]
GO
CREATE USER [mynewuser] FOR LOGIN [domain\firstname.lastname]
GO

Where mynewuser is paramater 1 and domain\firstname.lastname is second parameter.




Post #1396245
Posted Wednesday, May 21, 2014 11:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 7:36 AM
Points: 1, Visits: 6
Has this script been tested on SQL 2012. I found I had to change this code:

select count(*) '+
' from '+@database+'..sysmembers z , '+@database+'..sysusers su '+
' where z.memberuid = su.uid and su.name = '''+convert(varchar(255),@newuidname)+''' ) = 0

to this in order to script out the roles:

select count(*) '+
' from '+@database+'..sysmembers z , '+@database+'..sysusers su '+
' where z.memberuid = su.uid and su.name = '''+convert(varchar(255),@newuidname)+''' ) > 0
Post #1573274
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse