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: Keeping track of a before trigger

Re: Keeping track of a before trigger

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 18 Mar 1999 22:04:50 -0000
Message-ID: <921795502.10387.2.nnrp-09.9e984b29@news.demon.co.uk>


I assume this is a production-size system, so you can't simply put in a few DBMS_output lines to show you what is happening in a specific case.

There are two commonly implemented options: a) Use the DBMS_pipe to send messages to a listening PL./SQL process b) User utl_file to write a log file

To avoid massive volumes, you could write the logging code into an exception handler of the form:

    exception

        when 'constraint violated' then
            dump all info to utl_file or DBMS_pipe;
            raise;
        when others then
            raise;

    end;

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Doug Cowles wrote in message <36EEED99.117DE45F_at_bigfoot.com>...
>Is there any way to keep track of what a before trigger is doing?
>I'm running into a situation where a trigger is erroring out because
>of a constraint violation, but I don't know specifically what it was
>trying to do. 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 along
>with the transaction that fired the trigger in the first place.
Received on Thu Mar 18 1999 - 16:04:50 CST

Original text of this message

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