Managing the Replication Criteria List

The Replication Criteria List (RCL) contains the rules that determine whether an object is replicated by Db2® Mirror. The system administration team must design a replication strategy prior to implementation, since the initial rules are set during configuration of Db2 Mirror.

Whenever an object is created, updated, deleted, or has its properties altered, Db2 Mirror uses the RCL to determine its replication status. Instead of maintaining the replication status as an object attribute, the RCL is used to determine if the operation needs to be replicated to the other node.

The RCL is a rules engine that consists of a set of hierarchical rules identifying either groups of objects or a specific object which should or should not be replicated. Rules are defined to either include or exclude objects from replication. These rules are used to determine the replication status of existing objects or newly created objects without requiring each object on a node to be individually cataloged within the RCL.

The RCL is assigned an initial rule called the default inclusion state during the Db2 Mirror setup process prior to the clone. The default inclusion state determines whether an object is replicated when no specific rule exists for that object. The default inclusion state is the highest level rule in the RCL and it has two possible settings:

  • Exclude: No objects are replicated by default. To include specific objects as part of the replicated environment, additional rules must be created to identify the objects that are to be included.
  • Include: All eligible objects are replicated by default. Additional rules can be created to exclude objects from replication.

Authority information, such as authorization lists and user profiles, and a subset of system values are always replicated.

Note:

The default inclusion state can only be set during the initial setup process prior to the clone or changed by recloning SYSBAS or the IASP while removing all existing rules. The default inclusion state cannot be changed during normal RCL management.

The following figure shows the configuration screen on the Db2 Mirror GUI where the default inclusion state is set.

Figure 1. Configuring the default inclusion state with the Db2 Mirror GUI
Configuring the default inclusion state with the Db2 Mirror GUI
If using commands and SQL services to configure Db2 Mirror, the QSYS2.SET_DEFAULT_INCLUSION_STATE procedure is used to create the RCL and define the default inclusion state for SYSBAS.
CALL QSYS2.SET_DEFAULT_INCLUSION_STATE(INCLUSION_STATE => 'EXCLUDE');

In addition to the rule defining the default inclusion state, Db2 Mirror primes the RCL with system rules. These rules are for objects that are always replicated for Db2 Mirror or for objects that can never be replicated by Db2 Mirror. These rules cannot be modified or overridden by a user rule.

The system administrator can add user rules to the RCL to define the replication status for replication-eligible objects. The scope of these rules is used to determine if a specific object is included or excluded from replication.

The scope of a rule refers to its hierarchical level within the RCL. These levels determine whether a rule governs all objects within a library, all objects of a specific object type within a library, or a specific object within a library.

Figure 2. RCL hierarchical structure
RCL hierarchical structure

The previous figure shows an example of the hierarchical structure of RCL rules. In this example, the default inclusion state of exclude is overridden to be include for libraries LIB1 and LIB2. Rules are defined to exclude all objects of type *FILE and *PGM in LIB1. Additional rules exclude all objects of type *FILE in LIB2 except for the file FILE4 which is set to include.

Separate RCL for SYSBAS and database IASPs

The default inclusion state that is defined during Db2 Mirror setup of SYSBAS only applies to objects that reside in SYSBAS. Each database IASP has its own independent RCL and corresponding default inclusion state that must be defined when the IASP is added to the Db2 Mirror configuration.

Each default inclusion state setting is independent and results in a separately constructed RCL responsible only for the objects that reside within SYSBAS or the database IASP. For example, you can have a default inclusion state of exclude for all objects that reside in SYSBAS, a default inclusion state of include for objects that reside in one IASP, and a default inclusion state of exclude for another IASP. By referencing the rules in each of these independent RCLs, the replication state of any system object can be determined. Each RCL is separately maintained using the Db2 Mirror GUI or SQL services. Backup and recovery considerations for each RCL are discussed in Restoring Replication Criteria List data. The next figure illustrates the independent RCLs in use for SYSBAS and each database IASP.
Figure 3. RCLs in each defined IASP
RCLs in each defined IASP