Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL call stack
cpiodumpv_at_gmail.com wrote:
> owa_util.who_called_me will not give the name of the function/procedure
> only the package name. I need something like
> "pkg_name.procedure_name". Granted you have the line number however
> the requirement is to have proc/func name as well. Thanks.
That's not what you originally asked. You wrote: "so we can log the current function/procedure executing" Different question ... different answer.
What you want instead is the DBMS_APPLICATION_INFO built-in package. Look at the following procedures also documented in Morgan's Library at www.psoug.org.
DBMS_APPLICATION_INFO.READ_CLIENT_INFO DBMS_APPLICATION_INFO.READ_MODULE DBMS_APPLICATION_INFO.SET_ACTION DBMS_APPLICATION_INFO.SET_CLIENT_INFO DBMS_APPLICATION_INFO.SET_MODULE
At the beginning of each procedure or function do a set. In your exception handler do a get.
You can also set a variable, global to the package, with the name of the current code block as you enter it but then you asked for a built-in package solution.
Hope this helps.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed Jan 10 2007 - 18:38:31 CST