tags:

views:

77

answers:

2

What RDBMS command is used to tell what user has what permissions on a particular object?

+1  A: 

That depends on the database system you use. In Oracle, you can find out a lot by

select * from all_tab_privs;
ammoQ
+1  A: 

Heres how to do it in sql server 2005

    1 select dp.NAME AS principal_name,
    2         dp.type_desc AS principal_type_desc,
    3         o.NAME AS object_name,
    4         p.permission_name,
    5         p.state_desc AS permission_state_desc
    6 from    sys.database_permissions p
    7 left    OUTER JOIN sys.all_objects o
    8 on     p.major_id = o.OBJECT_ID
    9 inner   JOIN sys.database_principals dp
   10 on     p.grantee_principal_id = dp.principal_id
Chris Klepeis

related questions