Call tree/stack trace [message #9681] |
Mon, 01 December 2003 05:36 |
Mike Nibeck
Messages: 49 Registered: May 2002
|
Member |
|
|
Is there any method within PL.SQL to get a call-tree? ie) What procedure called the current proc, etc. and on back until the original invocation?
- Mike
|
|
|
Re: Call tree/stack trace [message #9682 is a reply to message #9681] |
Mon, 01 December 2003 06:11 |
Adrian Billington
Messages: 139 Registered: December 2002
|
Senior Member |
|
|
There is the DBMS_UTILITY.FORMAT_CALL_STACK function that can be used to return the call stack as a string. It formats the call stack with line feeds, but as it is just a string, you can use it in any way you wish.
I use an encapsulation of this which turns the string into a collection and then I can return any element of the stack as I wish. For example, I can find out the caller, generate a "who am i" style function etc.
Regards
Adrian
|
|
|
|