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: Oracle 7.3 Triggers

Re: Oracle 7.3 Triggers

From: John Verbil <jverbil_at_netmail.mnet.uswest.com>
Date: 1997/01/07
Message-ID: <32D2D31D.4B3F@netmail.mnet.uswest.com>#1/1

Rupesh Kapoor wrote:
>
> Hi,
>
> I am using oracle triggers in an application which runs multiple
> instances at the same time. Is there any way to ask an SQL statement to
> *not* execute the trigger under certain circumstances? Is it possible to
> pass a parameter to the trigger? Disabling triggers will not help since
> other threads should be able to use triggers at the same time.
>
> Thanks
> Rupesh

Create a package that has a variable like so:

        CREATE OR REPLACE PACKAGE PkgTriggerABC AS

                abc_trigger_enabled boolean := false;

        END PkgTriggerAGWG010T;

In your trigger code:

        if PkgTriggerABC.abc_trigger_enabled then

          (existing trigger logic)

        endif;

In the procedures that need the trigger "turned off":

        PkgTriggerABC.abc_trigger_enabled := false;

        (whatever fires the trigger that you don't want to)

        PkgTriggerABC.abc_trigger_enabled := true;

-- 
John Verbil
U S WEST Communications
Information Technologies
jverbil_at_uswest.com
(303) 896-0916
Received on Tue Jan 07 1997 - 00:00:00 CST

Original text of this message

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