RE
George Joseph, May 05, 2016 - 6:04 am UTC
You could make use of the owa_util.who_called_me to figure out who was the caller of the INSERT/UPDATE/DELETE etc.
create table t2(x int);
create or replace trigger trgg_t2
before insert or update or delete
on t2
declare
l_owner varchar2(30);
l_name varchar2(30);
l_lineno number;
l_caller_t varchar2(30);
begin
owa_util.who_called_me(l_owner,
l_name,
l_lineno,
l_caller_t
);
dbms_output.put_line(l_owner||':'||l_name||':'||l_lineno||':'||l_caller_t);
end;
begin
insert into t2 values(1);
end;
--::2:ANONYMOUS BLOCK
create or replace procedure p1
as
begin
insert into t2 values(2);
end;
begin
p1();
end;
MR:P1:4:PROCEDURE
May 05, 2016 - 6:24 am UTC
Thanks for the input George. Good to meet you in person in India !
RE
George Joseph, May 05, 2016 - 8:41 am UTC
It was good to meet you in person too,Connor. Thanks for taking you time and coming and taking awesome sessions in Oracle
Orozco Daniel Fernando, May 05, 2016 - 9:32 pm UTC
Thanks a lot!