SQL Clone
SQLServerCentral is supported by Redgate
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: 3703 | Views in the last 30 days: 7
Related Articles

Audit Script

Audit Script to find previous months scripts


SQL Server System Audit Report

Ensuring that your SQL Server is secure is the job of every Database Administrator. In this article ...


SQL Server Audit: Getting Started

SQL Server has the ability to monitor both server and database level events via the SQL Server Audit...


Script Generates Audit Triggers

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


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...