Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

How long does the Oracle call_stack stay available?

Randy Hagedorn
Regular Advisor

How long does the Oracle call_stack stay available?

Hi oracle database guru's:

We am investigating and trying to learn more about Oracle's database 'call_stack'. From what we have learned so far is that the call_stack, (when a procedure is executed from PL/SQL), the call_stack lists what is currently being executed in the procedure. So if an error occurs, it can show what was exactly happening at the time.

Our question:
How long is the information in the call_stack available for interegation? Is it only available during the current oracle session or can it be examined even from a non-current session? In other words, if a PL/SQL procedure would have an error, could we examine the data in the call_stack after the session has ended?

Thanks in advance,
Honored Contributor

Re: How long does the Oracle call_stack stay available?


A few clarifications.

A client application gets the full error stack cause the error is propagated out.

Once you have an exception block in PLSQL and catch the exception -- the error goes away, it by very definition doesn't exist. You caught it, you are dealing with it, you are handling it.

So, if you let the error propagate to the client, they get an error stack (we have an error)

If you catch the error in plsql, the error is gone, you just erased it.

hope this helps!
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Mikael Sandström
Occasional Visitor

Re: How long does the Oracle call_stack stay available?

It is only visible to the client (session) that executed the procedure. Unless you capture this error in your exception handling (put it in an exception-table etc)the error is gone after it is propagated to the client.

Brian Crabtree
Honored Contributor

Re: How long does the Oracle call_stack stay available?

It would also depend on what kind of error it is, and what is affected by it. Traces can be generated into the user_dump_dest area as well, where they will stay until deleted, along with any sql traces that you generate as well.

Any errors generated by PL/SQL are only listed with the procedure, however you can put an "exception" clause into the PL/SQL block to force out the error to do something else (insert into a table, run another procedure, etc).

Hope this helps,