Wednesday, November 26, 2008

SQL Script to list object privileges granted to a particular user

Login to database as sys / system / or any user who had dba privileges and run below command

select grantor 'granted' privilege 'on' table_name 'owned by' owner 'to' grantee from dba_tab_privs where grantee like upper('&GRANTEE_NAME') order by privilege;
where GRANTEE_NAME is the user you want to find out the privileges.

Even though the view name is dba_tab_privs, it lists privileges on all objects including tables, views, procedures, etc.,

Sample Output

APPS granted DELETE on FND_USER_RESP_GROUPS owned by APPS to XXXXXX
APPLSYS granted DELETE on FND_USER owned by APPLSYS to XXXXXX;

OraclePitStop

No comments: