Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: turning off triggers or allowing a trigger to determine to run or exit?
Jerry F. Davis wrote:
>
> I am *not* a Database person, but I am submitting a question for one who is in
> our company.
>
> We have a little problem. We have a product that we have developed that has
> something in it called an audit trail. The database person says it is all
> implemented via triggers.
>
> What we want to do is to offer this audit trail feature as an option.
>
> Current thinking is to have two identical databases with one using the
> triggers for audit trail and one without.
>
> This seems a waste to me. Is there a way we can set a variable somewhere in
> the database that we could then look at during an audit trail trigger event
> that we could simply exit the trigger if the audit trail flag variable is not
> set?
>
> Our database people don't think so. They say Oracle won't allow them to read
> a variable from a table during a trigger event - or something to that effect.
>
> I hope I have stated the case properly for them!!!
> Has anyone ever done this?
>
> Thank you.
>
> Regards,
> Jerry
Hmm I'm not with you all the way but it's possible to read a variable and from a database during a trigger event. There are howerver restricted functions that can not be run from certain triggers, because they can start calling them self in an endless loop. Received on Mon Aug 18 1997 - 00:00:00 CDT