Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> format_call_stack
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)
l_str varchar2(4096) default dbms_utility.format_call_stack; l_n1 number; l_n2 number;
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