K
K
Konstantin Dashkevich2014-11-12 21:32:09
Oracle
Konstantin Dashkevich, 2014-11-12 21:32:09

Proper method to synchronize multiple tables of two Oracle DBs?

There are two Oracle databases (FirstDB, SecondDB) on different servers located in the same network.
It is required to select data from several FirstDB tables and load it into one SecondDB table, minimizing the load on FirstDB.
My idea:
From SecondDB
CREATE TABLE x AS SELECT ... FROM X datalink .FirstDB [join ... ] where (from the synchronization log I get the time of the last synchronized record and filter the data by change time)
Thus loading all new and updated data, since the last synchronization, in SecondDB, and already from it, using the cursor on the table, I insert records where I should, if there is, then I update.
Will this method be optimal? Or is there a better one?
Sorry, I forgot to write - datalink to FirstDB with read-only rights.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vyacheslav Uspensky, 2014-11-13
@Vinchelo

There is another option, to insert tables on the initiative of the master database using the after insert trigger.

D
DmitrySytkov, 2014-11-13
@DmitrySytkov

You can create a mathematical representation in the second database, which is updated on a schedule or upon completion of a transaction, loading portions of data from the first database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question