Home » SQL & PL/SQL » SQL & PL/SQL » Call tree/stack trace
Call tree/stack trace [message #9681] Mon, 01 December 2003 05:36 Go to next message
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 Go to previous messageGo to next message
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
Re: Call tree/stack trace [message #10843 is a reply to message #9682] Thu, 19 February 2004 23:57 Go to previous message
Andreas Skoog
Messages: 1
Registered: February 2004
Junior Member
DBMS_UTILIY.FORMAT_CALL_STACK returns a maximum of 2000 bytes. Is there any way to get a full stack trace for deeply nested operations?
Previous Topic: getting ora error 12154 when trying to login in sqlplus
Next Topic: Query help
Goto Forum:
  


Current Time: Thu Apr 25 04:59:44 CDT 2024