views:

49

answers:

1

Through Oracle queries is it possible to find out which views/synonyms/tables a stored procedure use?

In PL/SQL Developer if you collapse out a stored procedure it will show "References" which shows all the tables/views/synonyms that the stored procedure uses.

I am trying to implement this functionality into a script which will come in handy.

Wondering if anyone knows a script that will fetch me all the synonyms/views/tables that a stored procedure uses?

+5  A: 

The information you are looking for is in the user_dependencies/all_dependencies view.

Rene
Except where dynamic SQL (EXECUTE IMMEDIATE / DBMS_SQL) is used.
Paul James