QUESTION POSED ON: 18 July 2006 I am interested in setting up a partial replication from one database to another. I have never done this before and would like some assistance in setting this up. Thanks.
To continue reading for free, register below or login
Requires Membership to View
To read more you must become a member of SearchOracle.com
Oracle has a product called Replication Services which performs this type of replication. This product costs additional funds which may not be justifiable for replicating a small subset of your database. If that is the case, then you can write your own replication routines using database triggers and database links.
Create the database link to the remote database:
CREATE DATABASE LINK link_name CONNECT TO
username IDENTIFIED BY password USING 'tns_alias';
Create a trigger on the table which populates newly inserted rows into the remote database table.
CREATE TRIGGER my_table_insert_trig
BEFORE INSERT ON my_table
BEGIN
INSERT INTO my_table@link_name VALUES
(:new.colA, :new.colB, ..., :new.colX);
END;
/
You'll have to create your own triggers similar to the above which perform your replication for you.
Search and Browse the Expert Answer Center Search and browse more than 25,000 question and
answer pairs from more than 250 TechTarget industry experts.
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.