Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Software to Generate PL/SQL Call Stack??

Re: Software to Generate PL/SQL Call Stack??

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Sun, 22 Jan 2006 07:23:45 -0500
Message-ID: <VaWdneFu1aXI5E7enZ2dnUVZ_vmdnZ2d@comcast.com>

<rajbrown_at_gmail.com> wrote in message
news:1137927240.757391.237300_at_g44g2000cwa.googlegroups.com...
> Thanks Daniel, that looks interesting and I'll give it a go. I wonder
> if there's anything which generates the call stack from the souce code
> though, rather than DBMS_UTILITY.FORMAT_CALL_STACK which presumably
> needs you to have the code running and entering every procedure/module
> to get the necessary info. If there were a utility which creates the
> call stack from the source file that would be ideal, though I suspect
> such a thing doesn't exist unfortunately.
>

code actually has to be running before a call stack exists, as the point of a the call stack is 'how did i get here' -- since the execution path can vary depending on any number or runtime conditions

however, you can examine the XXX_DEPENDENCIES data dictionary views to determine source code module dependency -- but they won't show you which procedures/functions/structures within a package are the reason for the dependency, just top-level dependencies. and they can't take into consideration dynamic sql

to reverse engineer module and module member usage, you could start with the _DEPENDENCIES views and do some mining of the _SOURCE views

a other few ideas, which all involve running the code in an altered environment:

[_] you could also compile the code in debug mode and run it with your own debugging code (see DBMS_DEBUG) and track the calling sequence [_] you could calibrate your code to track the calls (use pl/sql to read _SOURCE and insert the calibration calls at the beginning of each procedure and function -- a bit tricky but i remember doing it once) [_] perhaps use the DBMS_PROFILER package

these may or may not be applicable, but perhaps it will give you some ideas

++ mcs Received on Sun Jan 22 2006 - 06:23:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US