HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide

[Contents][Glossary][Index][Back][Next]

3.3.6 Data linkage for a table with a trigger set

Two types of triggers can be defined for tables, one that is defined by the user, and one that is defined automatically by HiRDB. This subsection explains the tasks required for linking data in tables with triggers defined.

Organization of this subsection
(1) Linking data in tables with triggers defined by the user
(2) Linking data in tables with triggers defined by HiRDB

(1) Linking data in tables with triggers defined by the user

If data linkage is applied to a table with a trigger defined by the user, inconsistency might occur between the databases because the trigger SQL is executed on the source database, and then after data linkage, the trigger is executed again on the target database.

Such a database inconsistency might occur in the following cases:

If either of these conditions is satisfied, specify not_execute in the control_trigger operand in the import environment definition.

Note:
  • If you define a file output statement of a routine control SQL statement in the AFTER trigger for the target table and specify not_execute in the control_trigger operand, data will not be output to the file.
  • If a trigger is defined for the target table and HiRDB is accessed from within a function of the import information editing interface, the control_trigger operand is ignored in the import environment definition.

(2) Linking data in tables with triggers defined by HiRDB

If CASCADE is specified as a referential constraint action for a table with a referential constraint defined, a trigger is defined for that table by HiRDB. If you will be applying data linkage to a table for which CASCADE is specified, make sure that the following conditions are satisfied:

Prerequisites

Limitations
A table for which a referential constraint is defined cannot be specified in an import information editing UOC routine.

If all these conditions are satisfied and a referential constraint is defined for tables that are subject to import processing, the corresponding tables are placed in check pending status. Execute the integrity check utility for each table and release the tables from check pending status.