RE: what package/procedure did SQL come from?

From: Tanel Poder <tanel_at_poderc.com>
Date: Tue, 2 Jun 2009 02:58:05 +0300
Message-ID: <2A37EB05E87A431CAB6F3B2E850243A7_at_porgand>



Hi Kyle,

> I want to correlate SQL to the packages and procedures they came from.
> Is there a way to do this before 10.2.0.4?
>
> Starting in 10.2.0.4 this is pretty easy thanks to the fields
>
> PLSQL_ENTRY_OBJECT_ID
> PLSQL_ENTRY_SUBPROGRAM_ID
> PLSQL_OBJECT_ID
> PLSQL_SUBPROGRAM
Btw, these columns are available also in 10.2.0.3.

The first thing that popped into my mind was V$OBJECT_DEPENDENCY but there is no dependency link between the PL/SQL object and the SQL fired from it, as the PL/SQL object isn't dependent on SQL cursor object as such but on the underlying schema objects instead.

So I'm not sure whether it's doable with realistic means before 10.2.0.3... but I agree, it's nice functionality for simple PL/SQL profiling. Btw it doesn't work well in some cases when calling out PL/SQL from SQL (like select from PL/SQL pipelined function etc)

--
Regards,
Tanel Poder
http://blog.tanelpoder.com

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jun 01 2009 - 18:58:05 CDT

Original text of this message