SELECT * FROM all_source -- or user_source or dba_source WHERE upper(text) LIKE '%MY TEXT%' AND TYPE IN ('FUNCTION','PROCEDURE','PACKAGE') ORDER BY owner, name, type, line;