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: Replication

Re: Replication

From: Steven Moen <smoen_at_enron.com>
Date: Thu, 20 Jul 2000 14:40:30 -0500
Message-Id: <10564.112576@fatcity.com>


Wrap your trigger with the following:

if dbms_reputil.from_remote = false then

..............

 end if;

SteveM

Paul van Dijken wrote:
>
> Listers,
>
> Since I have had no experience with replication and looking through the
> manuals did not provide a clear answer, here is a basic question on
> replication :
>
> I want to create a multi (2) master replicated database. Changes in database
> A have to be replicated in database B and vice versa for all tables. There
> is a requirement that all changes in the database have to be audited into a
> separate audit_trail table including time, user, reason, etc. We use
> triggers to do so.
>
> When I insert into database A, the inserted record is audited into the
> Audit_trail table of database A. However, since all tables are replicated
> into database B, the same record is also inserted into database B. The new
> record in the (A) Audit_trail table is replicated into (B) Audit_Table. But
> inserting a record triggers the database to put a new record into the (B)
> Audit_Trail table, resulting in 2 records in the (B) audit_trail table.
> (Now I do not want to think of the replication back into A again)
>
> How do I prevent above scenario. Does Oracle make a distinction between real
> Inserts in (B) and replicated inserts from (A) ? or do I have to modify my
> triggers so that I can see from where the insert came from ?
>
> Please help
>
> Paul
>
> --
> Author: Paul van Dijken
> INET: paul.vandijken_at_sema.nl
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> 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 Thu Jul 20 2000 - 14:40:30 CDT

Original text of this message

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