Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to restrict a trigger from firing when the DML is done re

RE: How to restrict a trigger from firing when the DML is done re

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 30 Oct 2002 10:20:39 -0800
Message-ID: <F001.004F7BDA.20021030102039@fatcity.com>


Ashoke,

The remote insert is connecting to the database via a certain Oracle user, right?

If so, then within the trigger, you can certainly say:

if USER = 'REMOTE_USER" then

   null;
else

   do normal trigger stuff;
end if;

If not, change the dblink from the remote database to connect as a certain Oracle account and do the above.

Hope this helps.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, October 30, 2002 10:09 AM To: Multiple recipients of list ORACLE-L remotely

Greetings All,

We have a before insert trigger on a table. We want this trigger to fire when the data is inserted locally and don't want this trigger to fire when the insert is done from a remote database using database link.

Does any of you have any idea how to achieve this.

Thanks,
Ashoke
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mandal, Ashoke
  INET: ashoke.k.mandal_at_medtronic.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Oct 30 2002 - 12:20:39 CST

Original text of this message

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