Re: How to find dependencies
Date: Thu, 4 Sep 2008 10:02:59 +0100
If you know what package.procedure(s) you are interested in, you can just search for references to 'package.procedure' in xxx_SOURCE view.
select name, type, line, text
where lower(text) like '%package.procedure%' and type = 'TRIGGER'
You can further limit by using a subquery finding all dependencies on the package from triggers.
It is valid to leave spaces between package, period, and procedure name; if that is likely, you might want to use a regex match rather than plain old LIKE. It is very rare (not completely unknown) for the package.procedure to be split across a line break (I'd regard that as a coding standards failure) eg
IF X > Y THEN
END IF: Finally; this mechanism picks up comments (and commented out calls). You can fairly easily exclude single line comments (--). It's more of a pain to exclude multiline comments (/* ... */). You can decide whether this is a big issue or not...
2008/9/3 Hameed, Amir <Amir.Hameed_at_xerox.com>
> Hi Folks,
> Here is the scenario; If a PL/SQL package contains multiple procedures
> and functions and there are triggers referencing a certain procedure in
> that package then is there a way to list all those triggers? The
> DBA_DEPENDENCIES view does not drill down to the sub-programs within a