<?xml version="1.0" ?> <replication> <input type="file"> <name>/var/dbre/exchange/test.lre</name> </input> <output type="db"> <type>fb</type> <server>localhost</server> <database>testdb</database> <user>SYSDBA</user> <password>masterke</password> </output> <deleted>1</deleted> <table> <input_name>table1</input_name> <output_name>table1</output_name> <unloaded>1</unloaded> <field> <input_name>id</input_name> <output_name>id</output_name> <type>int</type> <index>1</index> <autoinc>1</autoinc> </field> <field> <input_name>field11</input_name> <output_name>field11</output_name> <type>string</type> </field> <field> <input_name>field12</input_name> <output_name>field12</output_name> <type>timestamp</type> </field> <field> <input_name>field13</input_name> <output_name>field13</output_name> <type>int</type> </field> </table> <table> <input_name>table2</input_name> <output_name>table2</output_name> <field> <input_name>id1</input_name> <output_name>id1</output_name> <type>int</type> <index>1</index> </field> <field> <input_name>id2</input_name> <output_name>id2</output_name> <type>int</type> <index>1</index> <autoinc>1</autoinc> </field> <field> <input_name>field21</input_name> <output_name>field21</output_name> <type>int</type> </field> <field> <input_name>field22</input_name> <output_name>field22</output_name> <type>string</type> </field> <field> <input_name>field23</input_name> <output_name>field23</output_name> <type>int</type> </field> </table> </replication>
alter table TABLE1 add UNLOADED char(1);To reset the field at the time of recording the changes in the table you want to add a trigger for an event update:
create trigger TABLE1_BU0 for TABLE1 active before update position 0 as begin if (new.UNLOADED = old.UNLOADED) then new.UNLOADED = null; end2. For unloading information on deleted records in the database you want to add table deletedfields:
create table DELETEDFIELDS (TEXT varchar(255));For the record, its data in each table must be controlled by adding a trigger to an event before delete:
create trigger TABLE1_BD0 for TABLE1 active before delete position 0 as begin insert into DELETEDFIELDS (TEXT) values ('TABLE1;ID:'||cast(old.ID as varchar(10))||';'); endTrigger must enter the line to read: TABLE_NAME;KEY_FIELD_NAME1:VALUE;KEY_FIELD_NAMEN:VALUE;