Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Insert into a table within a trigger that raises an exception...
Hi,
> I test for my error conditions, raise a user defined exception and all
> raise_application_error. This stops the insert from occurring (good),
> but rolls back ANY changes that occurred during the execution of the
> trigger (bad) (e.g. a table which logs the invalid insert) which is
> what you'd expect it to do.
Try this:
Do not log into a table but into a file (use the DBMS_FILE package to write into files). AFAIK, COMMITs and ROLLBACKs do not influence the dataflow to and from files, so this should resolve your problem.
Greets,
Al.
Received on Thu Dec 04 1997 - 00:00:00 CST