SELECT * from ALL_OBJECTS returns the names of various procedures/packages/tables/other db objects. I want to look inside the PL/SQL code for a matching string. How do I do this?
Something like: (pseudocode) SELECT * FROM all_code WHERE line_of_code like ‘%mytext%’
Use something like:
There are many options, check out the USER_SOURCE table.
To search ALL code for a String:
Note that view code is not included in the
_SOURCEtables. View code is stored in[USER|ALL|DBA]_VIEWS.TEXTwhich is a LONG column and difficult to query.