| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Keeping track of a before trigger
Doug Cowles wrote
>I tried adding a log table to accept an insert of what
>it was trying to do, but it seems like that gets rolled back
... unless you add an exception handler. If so, then Oracle simply assumes that you handled the error and does not rollback any transactions. Be carefull:
create or replace trigger ...
sErr varchar2(200);
begin
savepoint my_start;
...
exception
when others then
sErr = sql.errmsg;
rollback to my_start;
insert into log_table
( log_date, error_text )
values
( sysdate, sErr );
Arjan. Received on Wed Mar 17 1999 - 15:32:47 CST
![]() |
![]() |