Re: Database synchronization - M?nchen

From: Siotos Evaggelos <sevag_at_eurodyn.com>
Date: Thu, 13 Feb 2003 10:49:13 +0200
Message-ID: <3E4B5C09.6040AE7D_at_eurodyn.com>


Hi Thomas,

I am working in similar but more complex project. After evaluating all the possibilities (export/import, incremental export/import, archived logs, etc) I found out all these aren't suitable for the job. So, I am developing a customised export.

What could you do in your case:

  1. Create in the old database (production database) an additional table that will hold all the inserts.
  2. Create in the old database (production database) triggers for each table you are interested and track the inserts by populating the above mentioned additional table.
  3. Perform a script that will read at the end of the day, the additional table and write sql statements into an sql file.
  4. Send the sql file and execute it on the offline system.

Since you are interested only for the inserts and if the production database doesn't contain CLOBs, BLOBs which must be handled in a different way, then it isn't that difficult. I hope I gave you some ideas.

Vangelis
Greece

Thomas wrote:
>
> I have one production database and one identical database (structure)
> on a different network.
>
> Each night, I need track the changes (insertions) that have taken
> place on the production database and then affect them on the offline
> system. Note that content of the online system that is old gets
> deleted whereas on the offline system, it sticks around forever: I am
> just tracking the inserts.
>
> exporting the database to a file would be a possibility if it checked
> changes at the row level as opposed to the table level. But since it
> doesn't and besides the output won't contain all the old deleted
> stuff, export is not an option.
>
> Is there a clever way to use archive logs or *whatever* to simply get
> a file containing insert statements that can be ftp'd over to the
> offline system?
Received on Thu Feb 13 2003 - 09:49:13 CET

Original text of this message