Search code examples
oracle-databasestored-proceduresoracle-sqldeveloperprivileges

Oracle Procedure Grant privileges List


I've searched a lot in order to find a table which can list all the privileges that can be granted over a procedure, for instance.

I've tried to get this information around these tables:

  • all_sys_privs
  • session_privs
  • user_sys_privs
  • dba_sys_privs
  • system_privilege_map

but without success.

What I want to get is a list that says:

"Procedures objects can grant EXECUTE and DEBUG privileges on USERS/ROLES".

Could you help me in this one?


Solution

  • the table you are looking for is V$OBJECT_PRIVILEGE

    SQL> select * from V$OBJECT_PRIVILEGE where object_type_name = 'PROCEDURE';
    
    OBJECT_TYPE_NAME     OBJECT_TYPE_ID PRIVILEGE_ID PRIVILEGE_NAME
    -------------------- -------------- ------------ ---------------
    PROCEDURE                         7           12 EXECUTE
    PROCEDURE                         7           26 DEBUG