Home » Server Options » Replication » Remote database tables updating each other.
Remote database tables updating each other. [message #366540] Wed, 27 September 2000 10:43 Go to next message
Peter
Messages: 62
Registered: August 2000
Member
Hi,

I have two databases where I have tables that I,trough triggers, want to update each other. customers@dB1 should update customers@dB2 AND vise verca. How do I avoid an infinite loop :-)? I could always add a field to the tables that stores the source of the update but is there a better way??
Re: Remote database tables updating each other. [message #366541 is a reply to message #366540] Wed, 04 October 2000 08:49 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Hi,

You can avoid an infinite loop by using the DBMS_REPUTIL.FROM_REMOTE function. look at this example:

IF dbms_reputil.from_remote is false THEN
-- put your orginal trigger code here...
END IF;

Hope it helps.

Best regards
Frank
Previous Topic: Best way to add columns to replicated object
Next Topic: ora00439
Goto Forum:
  


Current Time: Tue Apr 16 15:57:17 CDT 2024