Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> accessing (packaged) procedure name within procedure

accessing (packaged) procedure name within procedure

From: Jetlag <jetlag11235_at_yahoo.com>
Date: 14 Aug 2003 09:16:47 -0700
Message-ID: <2eeed00e.0308140816.7662de44@posting.google.com>


Linux, Oracle 9.2.0.1

Does anyone know of a system variable or some kind of logic which would return a string containing the name of the currently executing procedure?

I have tried using dbms_utility.format_call_stack, but this doesn't seem to work when a procedure (or function) is wrapped in a package. For example, if I have a package my_pak containing a procedure my_prc, and I call a utility function which uses dbms_utility.format_call_stack, the most detailed information in the callstack is my_pak ... nothing about my_prc.

Below is a test scenario to generate callstack data.

////////////////////////////////////

create or replace package my_pak as

   procedure my_prc;
end my_pak;

create or replace package body my_pak as procedure disp_call_stack is

   call_stack varchar2(4096) := dbms_utility.format_call_stack; begin

   while (length(call_stack) > 0) loop

      dbms_output.put_line(substr(call_stack, 1, 255));
      call_stack := substr(call_stack, 256);
   end loop;
end disp_call_stack;
procedure my_prc is
begin

   disp_call_stack;
end my_prc;
end my_pak;
////////////////////////////////////

begin my_pak.my_prc; end;

Suggestions would be most welcome. Thanks.

Received on Thu Aug 14 2003 - 11:16:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US