Replication Overview

Last updated on Jul 17, 2020

The runtime replication system is generated by command HVR Initialize in the GUI or hvrinit from the command line on the hub machine. HVR Initialize checks the channel and then creates the objects needed for replication, plus replication jobs in the HVR Scheduler. Also for trigger based capture (as opposed to log based capture), HVR creates database objects such as triggers (or 'rules') for capturing changes. Once HVR Initialize has been performed, the process of replicating changes from source to target location occurs in the following steps:

  1. Changes made by a user are captured. In case of log based capture these are automatically recorded by the DBMS logging system. For trigger based capture, this is done by HVR triggers inserting rows into capture tables during the user's transaction.
  2. When the 'capture job' runs, it transports changes from the source location to router transaction files on the hub machine. Note that when the capture job is suspended, changes will continue being captured (step 1).
  3. When the 'integrate job' runs, it reads from the router transaction files and insert, update and delete statements on the target location to mimic the original change made by the user.

Runtime replication requires that the HVR Scheduler is running. Right click on the hub database to create and start the HVR Scheduler.

HVR Initialize creates jobs in suspended state. These can be activated using the GUI by right clicking on a channel and select StartLike other operations in the HVR GUI, starting jobs can also be done from the command line. See command hvrstart.

The HVR Scheduler collects output and errors from all its jobs in several log files in directory $HVR_CONFIG/log/hubdb. Each replication job has a log file for its own output and errors, and there are also log files containing all output and only errors for each channel and for the whole of HVR.

To view errors, right-click the job underneath the Scheduler node in the navigation tree pane and select View Log. These log files are named chn_cap_loc.out or chn_integ_loc.out and can be found in directory $HVR_CONFIG/log/hubdb.