Re: How to find dependencies

From: Nigel Thomas <>
Date: Thu, 4 Sep 2008 10:02:59 +0100
Message-ID: <>


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
from user_source
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

    Package ,

       Procedure (a,b,c);
  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...

Regards Nigel

2008/9/3 Hameed, Amir <>

> 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
> package.
> Thanks
> Amir
> --

Received on Thu Sep 04 2008 - 04:02:59 CDT

Original text of this message