Subject | Re: [firebird-support] Need logging for dual databases. |
---|---|
Author | Milan Babuskov |
Post date | 2005-05-27T11:43:56Z |
zapperon wrote:
a STATUS char(1) field added to each table that has to go across the wire. I
get records to be copied with WHERE STATUS IS NULL, and after I dump the
records (using FBExport) I run UPDATE table-xyz SET STATUS = 'S' to mark
records as sent.
If you do this on-line (while users are adding new records), you would do
something like this:
- update table-xyz set status = 'T' where status is null
- dump (where status = 'T')
- update table-xyz set status = 'S' where status = 'T'
So:
NULL - means a new record
D - means record is sent
T - means record is to be transferred
This only covers inserts and one-way copy. If you also want error-checking,
handling of updates and deletes, than you really need some replicator, since
there is no quick&easy way of doing it.
--
Milan Babuskov
http://fbexport.sourceforge.net
> I have the following problem. I have a website that is database drivenSounds like a task for some replication tool.
> by firebird. At the moment I have to convert all of our local
> database record into insert statements and then send them in a
> compressed form over to the webserver , uncompress them there , empty
> the webserver and reinsert the whole database.
> Not good design, I knowAFAIK, no, there isn't any. You could however make your own mechanism. I have
> , was in quite a rush. Is there some table logging I can turn on in
> firebird 1.5.2 superserver so that it only logs which records it
> inserts , deletes and updates ?
a STATUS char(1) field added to each table that has to go across the wire. I
get records to be copied with WHERE STATUS IS NULL, and after I dump the
records (using FBExport) I run UPDATE table-xyz SET STATUS = 'S' to mark
records as sent.
If you do this on-line (while users are adding new records), you would do
something like this:
- update table-xyz set status = 'T' where status is null
- dump (where status = 'T')
- update table-xyz set status = 'S' where status = 'T'
So:
NULL - means a new record
D - means record is sent
T - means record is to be transferred
This only covers inserts and one-way copy. If you also want error-checking,
handling of updates and deletes, than you really need some replicator, since
there is no quick&easy way of doing it.
--
Milan Babuskov
http://fbexport.sourceforge.net