Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sync my Local Firebird Database with another Firebird Database?

Tags:

firebird

First of all i read this question: Firebird database replication

But i dont want to replicate...i just want to add the data that had changed on my database to our main database. Any ideas?

like image 328
bastianneu Avatar asked Oct 21 '25 19:10

bastianneu


2 Answers

AFAICT that's replication too.

like image 130
Douglas Tosi Avatar answered Oct 24 '25 14:10

Douglas Tosi


You should mark every change of your database and at one time read them and pass them to your other database.

You can mark each record with a logical value Modified=0/1 or with a TimeStamp.

Through triggers you should control this values

trigger before insert
begin
   modified = CurrentDateTime;
end

trigger before ubdate
begin
   modified = CurrentDateTime;
end

trigger before delete
begin
   insert into DELETED_RECORDS (id) values (old.id);
end
like image 39
Duilio Juan Isola Avatar answered Oct 24 '25 13:10

Duilio Juan Isola



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!