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:
> 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.
> Also, there doesn't seem to be any guarantee of the order in which
> before triggers fire, so adding another before trigger that keeps track
> of what is going on isn't guaranteed to execute first anyhow.
> I'm thinking of analyzing the feasability of changing the trigger to
> an after trigger, and making a before trigger keep track of the insert,
> update, delete or whatever. Any other ideas?
>
> - Dc.
Hi Doug
You are right with your assumption that there is no guarantee for an order of triggers of the same kind. Meaning 2 before row triggers fire not! in a determined way.
The other thing is, that all! fired triggers are rolled back if the original statement gets an exception. It doesn't matter if you are using a before or after trigger in that case!
Sorry, but I don't really know how to help....
Frank Received on Wed Mar 17 1999 - 09:46:39 CST