Assume table countries with following fields cNO,cCD,cNAME ---------------Trigger for COUNTRIES----------------------------------------------- create or replace trigger COUNTRIESTOTEMP after insert or update or delete on COUNTRIES for each row Begin if inserting then insert into temp_countries (cNO,cCD,cNAME,INTLCD,imd,A) values (:new.cNO,:new.cCD,:new.cNAME,:new.INTLCD,'I',1); elsif updating then insert into temp_countries (cNO,cCD,cNAME,INTLCD,imd,A) values (:new.cNO,:new.cCD,:new.cNAME,:new.INTLCD,'M',1); else insert into temp_countries (cNO,cCD,cNAME,INTLCD,imd,A) values (:old.cNO,:old.ccd,:old.cname,:old.INTLCD,'D',1); end if; end; ----procedure for replicating countries create or replace procedure copy_cat_ac as cursor c_temp_countries is select * from temp_countries where A is null; c_countries c_temp_countries%rowtype; begin ----------------------------------- Replicate for countries --Push the data into srvr2 insert into temp_countries@srvr2 select * from temp_countries where a=1; delete from temp_countries where a=1; -- row which has been propagated is now deleted from the local temp tab commit; --Pull the data from srvr2 into temp tables insert into temp_countries select * from temp_countries@srvr2 where A is null; update temp_countries@srvr2 set a=1 where a is null; -- set bit to 1 to show A has got it; commit; ----- update the local table from temp tables execute immediate 'lock table countries in exclusive mode'; For c_countries in c_temp_countries loop if c_countries.imd='I' then insert into countries (cNO,cCD,cNAME,INTLCD) values (c_countries.cNO,c_countries.cCD,c_countries.cNAME,c_countries.INTLCD); elsif c_countries.imd='M' then update countries set cNO=c_countries.cNO, cCD =c_countries.cCD, cNAME=c_countries.cNAME, INTLCD=c_countries.INTLCD where cNO=c_countries.cNO; elsif c_countries.imd='D' then delete countries where cNO=c_countries.cNO; end if; delete from temp_countries where cNO=c_countries.cNO; end loop; commit; ----------------------------------- countries replicated end; Note: 1. Above source code for trigger and the procedure for replication is automatically generated by a script, which captures the schema information and generates the source code. 2. table countries reside in two servers - srvr1 and srvr2. 3. The above procedure runs at srvr1. 4. Temporary table temp_countries is created for 'store and forward' as referred to in my article 5. There is a similar but slighly different procedure that runs in srvr2. 6. This is just a sample script. There is a lot more which has been done for conflict resolution. 7. 'A' is the alias given to srvr1. Field 'IMD' is to determine whether the given transaction is Insert/Modify/Delete 8. Srvr1 and srvr2 were connected via WAN over 128K line and replication is near online.