Databases
cancel
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,
Randy
3 REPLIES
Yogeeraj_1
Honored Contributor

Re: How long does the Oracle call_stack stay available?

hi,

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!
yogeeraj
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.

hth
/M
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,

Brian