FairCom DB is capable of replicating various file operations such as creates, deletes, renames, and alters. To replicate these operations with FairCom RTG, the tables need to meet a few requirements.
To replicate operations, participating tables must have the “transaction dependent” mode enabled. To enable “transaction dependent” when creating new tables, use the following ctree.conf configuration:
<transaction fileoperations="yes" ...>yes</transaction>
To enable “transaction dependent” for tables that are already created, use the FairCom DB cttrnmod utility:
./cttrnmod set T +C +R -f list.txt -u ADMIN -p ADMIN -s FAIRCOMS
where list.txt is a list of files, one per line.
Replication of new or renamed tables requires that the table name matches a replication file filter. For example, if a SQL table is named “test,” the file filter would look like this:
<?xml version="1.0" encoding="us-ascii"?>
<replfilefilter version="1" persistent="y">
<file status="include">.\ctreeSQL.dbs\admin_test.dat</file>
<purpose>create_file</purpose>
<purpose>read_log</purpose>
</replfilefilter>
For a rename or delete operation, both existing and new table names must match the filter rule. In the above example, allowing the “test” table to be renamed to to “prod” and replicating this operation would require an additional filter rule:
<?xml version="1.0" encoding="us-ascii"?>
<replfilefilter version="1" persistent="y">
<file status="include">.\ctreeSQL.dbs\admin_test.dat</file>
<file status="include">.\ctreeSQL.dbs\admin_prod.dat</file>
<purpose>create_file</purpose>
<purpose>read_log</purpose>
</replfilefilter>
File filter rules may contain wildcards to simplify definitions. For example, entire directories can be enabled and exclude specific files or file classes with the status=”exclude” option.
Replication of file operations is off by default. It is enabled with the following ctreplagent.cfg configuration:
replicate_data_definitions yes
When tables and configurations meet these criteria, operations can be replicated across servers for seamless file maintenance across systems.