SQL Server 2005: View all permissions

select dp.NAME AS principal_name, dp.type_desc AS principal_type_desc, o.NAME AS object_name,

p.permission_name, p.state_desc AS permission_state_desc

from sys.database_permissions p

left OUTER JOIN sys.all_objects o on p.major_id = o.OBJECT_ID

inner JOIN sys.database_principals dp

on p.grantee_principal_id = dp.principal_id

(found somewhere on web)

Posted in SQL. 1 Comment »

One Response to “SQL Server 2005: View all permissions”

  1. Anonymous Says:

    this was helpful. thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: