Overview

Have you ever wondered how to view object permissions using a query?

Simple example

Try this on a database:

select o.name, u.name, p.permission_name, p.state, p.state_desc
  from sys.database_permissions p
       inner join sys.all_objects o
         on p.major_id = o.object_id
       inner join sys.database_principals u
         on p.grantee_principal_id = u.principal_id

References

Versions

Metadata


Bookmark with :
Digg It! DZone StumbleUpon Technorati Reddit Del.icio.us Newsvine Furl Blinklist
posted @ Thursday, January 17, 2008 9:02 AM | in SQL Server Security Software Development IT Management

Comments

No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  


Please add 3 and 1 and type the answer here: