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

Home -> Community -> Usenet -> c.d.o.server -> format_call_stack

format_call_stack

From: Brian Gastineau <bgastine_at_giveblood.org>
Date: 1997/07/01
Message-ID: <01bc866c$a6bc9ce0$b90110ac@gastineau1.giveblood.org>#1/1

I am trying to use the dbms_utility.format_call_stack in a procedure to determine the currently firing trigger. It works if it is initiated from SQL*Plus or from SQL*Loader. It returns an "anonymous block" instead of the trigger name if it is fired from from a PL/SQL package. Any ideas?

The code used follows:
 (all was originally provided by Thomas Kyte in an earlier posting)



create or replace procedure proc3
as
    l_str varchar2(4096) default dbms_utility.format_call_stack;
    l_n1    number;
    l_n2    number;

begin
    l_n1 := instr( l_str, chr(10), -2 );
    l_n2 := instr( l_str, chr(10), -1 );
    l_str := substr( l_str, l_n1, l_n2-l_n1-1 );
 

    dbms_output.put_line( l_str );
end;
/  

drop table foobar;
create table foobar ( x number );  

create or replace trigger foo_trigg
before insert or update or delete on foobar for each row
begin

    proc3;
end;


Thanks,
Brian Gastineau
bgastine_at_giveblood.org Received on Tue Jul 01 1997 - 00:00:00 CDT

Original text of this message

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