Subject Re: [firebird-support] Tutorial create replicator FB 2.5
Author Thomas Steinmaurer
>> I want to create simple program replicator
>
> Replication is anything but simple.
>
> However, if you really want to, here's an outline of how you could do
> one-way replication:
>
> - Create AFTER insert/update/delete triggers on all interesting tables.
> - Make those triggers record the changes to some LOG table and fire some
> event.
> - Create a replicator application that listens to events, reads the LOG
> table sequentially and applies changes to destination database
> - To safeguard from triggers firing, the replication app. can use a
> special username or role and have replication triggers fire only when
> this user/role is not performing the change (via CURRENT_USER or
> CURRENT_ROLE)
>
> Of course, there are many issues to take care of:
>
> - Format of LOG table(s). There are different strategies how to store
> changed/deleted values. You can have multiple tables to accomodate
> different datatypes efficiently. I prefer solution with 3 tables (one
> for numbers, dates and small varchars, second for largest possible
> varchar, and third for BLOBs).
>
> - Conflict resolution. What to do when changes to destination database
> fails.
>
> - Generators/sequences. This would require to know application-specific
> rules and possible modification of existing application
> code/triggers/procedures because generators are outside transaction control.
>
> Well, those are general issues you might encounter. I recommend that you
> estimate whether it would cost you less to implement some existing
> replication solution than build your own.

Being in some way in an unidirectional stand-by database business with
IB LogManager, there is no good reason to build your own solution
money-wise, except you have very special requirements for your environment.

Although Firebird doesn't offer an out-of-the box replication solution,
there is a vital third-party market available.



--
With regards,

Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!