REPLICATION_CRITERIA_INFO view

The REPLICATION_CRITERIA_INFO view returns the Db2® Mirror object replication rules. The view returns one row for each rule in the Replication Criteria List (RCL). Each row describes a rule that determines whether objects are included or excluded from replication.

Start of change

Authorization: The privileges held by the authorization ID of the statement must include the following1:

  • For the authority needed to use this view, see Authorization.
  • *EXECUTE authority on the QSYS2 library.
  • *OBJOPR and *READ authority on QSYS2/MIRROR_RCL.

When connected to a database IASP, the privileges held by the authorization ID of the statement are applied to the separate RCL table in library QSYS2nnnnn/MIR_RCLnnn.

The following table describes the columns in the view. The system name is RCL_INFO. The schema is QSYS2.

End of change
Table 1. REPLICATION_CRITERIA_INFO view
Column Name System Column Name Data Type Description
RULE_IDENTIFIER RULE_ID BIGINT A system-assigned value that identifies this RCL rule.

Identical active rules can exist with RULE_SOURCE values of SYSTEM and USER. These will have the same rule identifier.

APPLY_STATE STATE VARCHAR(14) The state of the replication criteria rule in the RCL.
ACTIVE
This replication criteria rule is used to determine the inclusion state for objects.
PENDING ADD
This replication criteria rule is an addition to the RCL that has not been committed. The rule has no effect on determining the inclusion state for objects during active replication.
PENDING REMOVE
This replication criteria rule is a removal from the RCL that has not been committed. The rule has no effect on determining the inclusion state for objects during active replication.
TRACKED
This replication criteria rule is currently active and is used on this partition to determine the inclusion state for objects. The rule was applied while the partition was in tracked state and it must be reconciled with the RCL on the other node when node synchronization occurs.
INCLUSION_STATE INC_STATE VARCHAR(10)
Nullable
The replication inclusion state for this rule in the RCL.
DEFINITION
Objects that best match this replication criteria rule are replicated. Only the definition of the object is replicated.
EXCLUDE
Objects that best match this replication criteria rule are excluded from replication.
INCLUDE
Objects that best match this replication criteria rule are replicated.
PROCESSING
This rule is currently being committed to the RCL. Its final inclusion state has not been determined.

Contains the null value when APPLY_STATE is PENDING REMOVE.

APPLY_LABEL LABEL VARCHAR(26)
Nullable
The apply-label assigned to a pending rule. All pending rules with the same label can be processed as a group.

Contains the null value if APPLY_STATE is not PENDING ADD or PENDING REMOVE.

IASP_NAME IASP_NAME VARCHAR(10) Name of the independent ASP group associated with the replication criteria rule. Contains either the name of the ASP group or the following special value:
*SYSBAS
This rule is associated with objects stored in either the system ASP (ASP 1) and any basic user ASPs (ASPs 2-32).
LIBRARY_NAME LIBRARY VARCHAR(10)
Nullable
Name of the library.

Contains the null value if this replication criteria rule does not use the library name in its definition.

OBJECT_TYPE TYPE VARCHAR(8)
Nullable
Object type.
*AUTL
Authorization list
*DTAARA
Data area
*DTAQ
Data queue
*ENVVAR
System-level environment variable
*FILE
Database file
*JOBD
Job description
*JOBQ
Job queue
*JRN
Journal
*OUTQ
Output queue
*PGM
Program
*SQLPKG
SQL package
*SQLUDT
SQL user-defined type
*SQLXSR
SQL XML schema repository
*SRVPGM
Service program
*SYSVAL
System value
Start of change*USRIDXEnd of change
Start of changeUser indexEnd of change
*USRPRF
User profile
Start of change*USRSPCEnd of change
Start of changeUser spaceEnd of change

Contains the null value if this replication criteria rule does not use the object type in its definition.

OBJECT_NAME OBJECT VARCHAR(128)
Nullable
System name of the object, system-level environment variable, or system value.

Contains the null value if this replication criteria rule does not use the object name in its definition.

RULE_SOURCE SOURCE VARCHAR(6) Indicates the source of this replication criteria rule.
SYSTEM
The rule was implicitly added by the IBM® i operating system.
USER
This rule was explicitly added by a user.
REMOVABLE REMOVABLE VARCHAR(3) Indicates whether this replication criteria rule can be removed by using the QSYS2.REMOVE_REPLICATION_CRITERIA procedure.
NO
The rule cannot be removed.
YES
The rule can be removed.
RESTRICTED RESTRICTED VARCHAR(3) Indicates whether this replication criteria rule restricts the addition of other rules.
NO
This rule does not restrict adding related rules.
YES
This rule restricts adding related rules.
FAILURE_MESSAGE FAILURE VARCHAR(7)
Nullable
The message identifier for the last failure that occurred during an apply of this pending rule. This rule is part of a group of rules identified by APPLY_LABEL that encountered an error during the apply. The error needs to be resolved before the APPLY_LABEL group of rules can be successfully applied to the RCL.

Contains the null value if the APPLY_STATE is ACTIVE or TRACKED or if this is a pending rule with no failure information.

Examples

  • List all the active replication criteria rules for the node.
    SELECT * FROM QSYS2.REPLICATION_CRITERIA_INFO
        WHERE APPLY_STATE = 'ACTIVE'
        ORDER BY IASP_NAME, LIBRARY_NAME, OBJECT_TYPE, OBJECT_NAME;
  • List all the active replication criteria rules for files in library APPLIB1 where only the definition of the file is being replicated.
    SELECT * FROM QSYS2.REPLICATION_CRITERIA_INFO
        WHERE APPLY_STATE IN ('ACTIVE', 'TRACKED') AND
            LIBRARY_NAME = 'APPLIB1' AND 
            OBJECT_TYPE = '*FILE' AND
            INCLUSION_STATE = 'DEFINITION';
  • List all the pending rules.
    SELECT APPLY_LABEL, P.*
       FROM QSYS2.REPLICATION_CRITERIA_INFO P
       WHERE APPLY_STATE IN ('PENDING ADD', 'PENDING REMOVE')
       ORDER BY APPLY_LABEL;
1 When connected to an IASP, the user must have authorization to the SYSBAS RCL and the IASP's RCL.