How create a query to show all functions and procedures to which I have access? SQL Oracle

Viewed 129

How can I write a query to show all functions and procedures to which I have access. Including the owner of the object as well.? Oracle SQL.

1 Answers
SELECT * 
FROM all_source
WHERE type in ('PROCEDURE', 'FUNCTION')
AND OWNER = ''; -- ENTER YOUR OWNER NAME HERE

Or maybe this is what you are looking for:

  SELECT *
  FROM dba_tab_privs
  WHERE TYPE IN ('PROCEDURE', 'FUNCTION')
  AND (GRANTEE = '' -- ENTER YOUR USER NAME HERE
       OR GRANTEE in (SELECT granted_role
                      FROM dba_role_privs
                      WHERE GRANTEE = '') -- ENTER YOUR USER NAME HERE
Related