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: Replicating triggers and procedures

Re: Replicating triggers and procedures

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Thu, 13 Feb 2003 22:19:46 -0500
Message-ID: <v4oo2mbs2gvn06@corp.supernews.com>


#2 + a condition on the trigger not to fire when the data inserted/deleted/updated is coming via replication. So yes, an update to Table A will also cause the trigger to fire on the remote node causing possible corruption .. assuming we are talking about a trigger which fires on update.

Thus if Trigger on table A fires and updates Table B ... The update will be replicated ... and thus Trigger needs to have it coded explicitly that it should not fire when the data is coming through replication.

Read all about it in the replication manual. It is clearly stated out there. .. you need that manual!

Anurag

"Ralf Fernan" <ralphfernan.nospam_at_yahoo.com> wrote in message news:JLX2a.51077$zF6.3443238_at_bgtnsc04-news.ops.worldnet.att.net...
> The trigger 'X' in this particular case is fired if certain conditions in
> Table A are met, subsequently inserting a row in Table B.
> Here is my confusion: if I need to replicate Tables A and B, what should I
> put in the replication group?
> 1) Tables A and B, and Trigger X
> 2) Tables A and B
> 3) Table A and Trigger X
> If Table A is in the replication group, would an update to Table A on the
> local node cause the trigger "X' to be fired in the remote node when it is
> replicated?
>
> "Anurag Varma" <avdbi_at_hotmail.com> wrote in message
> news:v4oe3v49sbm866_at_corp.supernews.com...
> > If you are implementing row-based replication then in most cases you would
> > alter the triggers to include code so that the triggers don't fire when
> data is being
> > inserted via replication. However if the trigger writes to a table which
> is not being replicated,
> > you might not want the code which prevents its code execution.
> >
> > However, in short, you would be looking at the case 1)
> >
> > I'm assuming that the procedures you talk about are ones associated with
> the trigger (i.e. you
> > are not talking about procedural based replication).
> >
> >
> > Anurag
> >
> > "Ralf Fernan" <ralphfernan.nospam_at_yahoo.com> wrote in message
> news:GUV2a.35176$rq4.2667406_at_bgtnsc05-news.ops.worldnet.att.net...
> > > Is it necessary to include the triggers or stored procedures in the
> > > replication group, if the data structures (tables) they affect are in
> that
> > > replication group?
> > >
> > > So, in a (multimaster) replication environment, if the DB application
> > > executes a trigger or procedure which results in data modifications on
> one
> > > master site, will Oracle propogate these changes to the other master
> sites,
> > > if 1) the affected tables are included in the replication group, but the
> > > affecting triggers and procedures are not; or, 2) the affected tables,
> and
> > > affecting triggers and procedures are included in the replication group.
> > >
> > >
> >
> >
>
>
Received on Thu Feb 13 2003 - 21:19:46 CST

Original text of this message

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