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 -> Re: Insert into a table within a trigger that raises an exception...

Re: Insert into a table within a trigger that raises an exception...

From: Karl E. Jørgensen <kjorg_at_msn.com>
Date: 1997/12/10
Message-ID: <OXDXbnaB9GA.153@upnetnews02.moswest.msn.net>#1/1

Nope - all you can do is to raise the error. And then the insert statement (and everything your trigger did) is rolled back.

I guess that the best you can do is to write a message to a pipe (via DBMS_PIPE) and have some other process continuously reading from the other end of the pipe - the trick being that pipe stuff isn't rolled back

Hope this helps

Karl

Doug Swanson wrote in message <3482CABA.B61EB626_at_hms.harvard.edu>...
>Can/how would you do this...
>
>I have an before insert trigger on a table that maintains a foreign key
>column that the application is unaware of. Since I can't rely on the
>3rd party app always sending its columns in the correct format, I wanted
>to check for certain errors and log them.
>
>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.
>
>Is there any other way to stop the insert from occurring besides
>raise_application_error, that would allow the insert into my error log
>to happen?
>-or-
>Is there some other way to have what happens in a trigger NOT rolled
>back when an exception is raised.
>
>Thanks
>-Doug
>
>
Received on Wed Dec 10 1997 - 00:00:00 CST

Original text of this message

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