Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 7.3 Triggers
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-0916Received on Tue Jan 07 1997 - 00:00:00 CST