Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Audit All Permissions

By Jim Sebastiano,

This script is used for auditing the permissions that exist on a SQL Server.  It will scan every
database on the server (separate scripts to run only one database are commented at the bottom)
and return four record sets:
1. Audit who is in server-level roles
2. Audit roles on each database, defining what they are and what they can do
3. Audit the roles that users are in
4. Audit any users that have access to specific objects outside of a role

NOTE: This script was written for MS SQL Server 2005 and uses undocumented system tables, rather than the standard MS procedures.  It is likely that this script will not work in future versions
of SQL Server.

Total article views: 3060 | Views in the last 30 days: 22
 
Related Articles
FORUM

Audit Script

Audit Script to find previous months scripts

SCRIPT

Script Generates Audit Triggers

This script generates a audit trigger for each table in the database. The trigger then logs when eac...

BLOG

Slides and Scripts from Idera Auditing SQL Server presentation

I had a few folks ask me for the slides and SQL scripts from the Auditing SQL Server webinar I...

FORUM

Audit script

Creating an update record audit script

SCRIPT

Audit SQL Logins - Updated

SQL Auditing - Generate a listing of the SQL logins, and the permissions for each database on a serv...

Tags
auditing    
login    
permission    
role    
security    
user    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones