Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic


REPLICATE <filename>

Server Configuration Option

The easiest method to define files that should be replicated is directly at the source using the REPLICATE keyword:

REPLICATE <filename>

When included in ctsrvr.cfg this specifies which file(s) to enable transaction log information for replication. Multiple REPLICATE statements are allowed. The file name may include wildcard characters (see FairCom DB Standard Wildcards). Multiple entries are supported.

Note: Choose wild cards carefully as certain FairCom files, such as REPLSTATEDT.FCS, must not be replicated. For example, REPLICATE *.dat is preferable to REPLICATE *. Another set of files that can be unexpectedly affected are c-tree Superfile members that match a wildcard specification.

External XML File Filters

File definitions can be specified by an external XML definition. This allows dynamically enabling replication without stopping and starting servers for configuration changes. This file can be set in ctreplagent.cfg and changed at runtime using repadm -c changefilter and -c removefilter with -x option indicating the external filter file name. repadm requests the replication agent to perform the specified filter operation and the replication agent applies the filter to the source server if the purposes indicate that it applies to the source server.

XML file filters are defined as follows:

<?xml version="1.0" encoding="us-ascii"?>

<replfilefilter version="1" update="1" persistent="y">

<file status="include">mark.dat</file>

<file status="exclude">donotreplicate*.dat</file>

<file status="include" regexPath=".\ctreeSQL.dbs">.*((data|dat|db))</file>







version="1.0" is the XML format version defining the current specification.

persistent="y" persists the filter definition on the source source such that it is automatically loaded on startup. REPLFFCHGDT.FCS

update="1" Processes an update to the current file filter.


<file> - list of files to include or exclude from replication. This supports regular expressions. The regexPath tag specifies an optional path as a regular expression and is applied to only the file name without path.

<purpose> indicates the purposes of the filter.

  • open_file - applies names to the source server like the server configuration REPLICATE does. This enables matching files for replication.
  • read_log - applies to the source server to determine which log entries are returned to the replication log reader like original replication file filter does.
  • sync_commit - makes a synchronous commit of the specified replicated file
  • create_file - create file on target if it doesn't exist

See Also


Note: The low-level FairCom DB UpdateHeader() API can be used to enable replication on a per file basis. Use the ctREPLCIATEhdr mode with either NO (off) or YES (on) for the hdrval. If the file does not have an extended header, then the change will not persist once the file is closed and reopened. Because failure to enforce replication is a serious problem, UpdateHeader() returns a special error code, -EXTH_ERR (-734), when the request succeeds, but the file header is not extended. This is more of a warning than an error.

See Also