COMPARE_RESYNC_STATUS table function

The COMPARE_RESYNC_STATUS table function compares the entries in the QSYS2.RESYNC_STATUS views on the primary and secondary nodes and returns any potentially conflicting entries from both nodes. If potentially conflicting entries exist, the user must defer the conflicting entries on the secondary node before resynchronization can be performed. For more information on deferring entries see the QSYS2.CHANGE_RESYNC_ENTRIES procedure.

Authorization: The privileges held by the authorization ID of the statement must be authorized to the QIBM_DB2_MIRROR function usage identifier. For the authority needed to use this table function, see Authorization.

Read syntax diagramSkip visual syntax diagram COMPARE_RESYNC_STATUS ( )

The schema is QSYS2.

The RESYNC_STATUS view in the auxiliary storage pool (ASP) group of the current thread will be compared on the source and target nodes.

Any deferred or historical entries are ignored.

Some entries that appear to conflict will not be included in the comparison:
  • *USRPRF and *AUTL entries

    Security has deeper attribute checking that is used to resolve differences.

  • *SPLF entries

    Spool file entries are unique on each system

  • Database I/O entries

    Any row that appears to have been changed on both the primary and secondary nodes will be changed to the primary node's row value. Otherwise, row changes from both the primary and secondary nodes will be replicated.

The result of the function is a table containing rows with the format shown in the following table. All columns are nullable.

Table 1. COMPARE_RESYNC_STATUS table function
Column Name Data Type Description
LOCATION CHAR(6) The location of the RESYNC_STATUS entry.
LOCAL
This is a RESYNC_STATUS entry from the local node.
MIRROR
This is a RESYNC_STATUS entry from the remote node.
SYSTEM_OBJECT_SCHEMA CHAR(10) The name of the library containing the object. For move requests, this is the new library for the object.

Contains the null value if SYSTEM_OBJECT_TYPE is *SECATR or *FCNUSG.

SYSTEM_OBJECT_NAME VARCHAR(300) The system name of the object to resynchronize. For rename requests, this is the new name for the object.

Contains the null value if SYSTEM_OBJECT_TYPE is *SECATR.

SYSTEM_OBJECT_TYPE CHAR(8) The system type of the object to resynchronize.
Supported types are:
*AUTL
Authorization list
*DTAARA
Data area
*DTAQ
Data queue
*ENVVAR
System-level environment variable
*FCNUSG
Function usage
*FILE
Database file
*JOBD
Job description
*JOBQ
Job queue
*JRN
Journal
*LIB
Library
*OUTQ
Output queue
*PGM
Program
*SECATR
Security attribute
*SPLF
Spooled file
*SQLPKG
SQL package
*SQLUDT
SQL user-defined type
*SQLXSR
SQL XML schema repository
*SRVPGM
Service program
*SYSVAL
System value
*USRIDX
User index
*USRPRF
User profile
*USRSPC
User space
MEMBER_NAME CHAR(10) Member name to resynchronize if this is a database file.

Contains the null value if the entry is not for a specific member.

SUGGESTED_PRIORITY SMALLINT Priority 0 is the highest priority.

For a tracked entry, during resynchronization preprocessing the suggested priority is updated to leave a historical record of the priority that was in effect when the resynchronization occurred.

Contains the null value if preprocessing has not identified a priority for this entry.

RESYNC_TYPE VARCHAR(13)
The technology used to resynchronize this object.
CL COMMAND
A CL command will be used.
DB DDL
The mechanism for changing database object definitions will be used.
DB I/O
The mechanism for changing data in a database file will be used.
DTAARA CHANGE
The mechanism for changing data areas will be used.
PROGRAM CALL
A program will be called.
SAVE/RESTORE
The object will be saved and restored.
SQ DDL
The mechanism for changing SQL object definitions will be used.
RESYNC_TYPE_DESCRIPTION VARCHAR(300) Text description that further describes RESYNC_TYPE.
TRACKING_TIME TIMESTAMP Timestamp when the entry was added.
RESYNC_STARTTIME TIMESTAMP Timestamp when resynchronization started.

Contains the null value if resynchronization has not started.

RESYNC_ENDTIME TIMESTAMP Timestamp when resynchronization completed.

Contains the null value if resynchronization has not completed.

TRACKING_REASON VARCHAR(19) The reason this object is tracked:
CREATE MOVE RENAME
Replication for a create, move, or rename of this object is done using the resynchronization process.
NORMAL REQUEST
Replication of this object is done using the resynchronization process.
RCL CHANGE
A change was made to the Replication Criteria List.
RCL CHANGE DDL ONLY
A change was made to the Replication Criteria List for object definition.
UNABLE TO MIRROR
The REPLICATION_STATE is not ACTIVE, so objects cannot be replicated.
UNEXPECTED ERROR
Replication failed unexpectedly. The object still needs to be replicated.
JOB_NAME CHAR(28) The qualified job name that added this tracking entry.
FAILURE_MESSAGE CHAR(7) Failure message ID for failed resynchronization.

Contains the null value if resynchronization has not failed.

RESYNC_GROUP INTEGER Identifier for a group of one or more objects that are preprocessed together.
RESYNC_DEFERRED VARCHAR(15) Indicates whether this resynchronization entry will be processed immediately or deferred.
DEFERRED
Replication is deferred until a complete set of operations has been defined.
IMMEDIATE
Not in tracking mode. Normal replication of this object uses the resynchronization process.
NOT DEFERRED
In tracking mode. The resynchronization will happen when the nodes are communicating again.
NOT RECOVERABLE
Unexpected problem occurred.
RCL DEFERRED
Object from Replication Criteria List is deferred.
RESYNC DEFERRED
The entry was deferred because another operation on the same object made the operation unnecessary. For example, a CRTDTAARA followed by a DLTDTAARA may make both operations unnecessary.
USER DEFERRED
A user deferred the entry using QSYS2.CHANGE_RESYNC_ENTRIES.
RESYNC_CL_COMMAND
DBCLOB(32702)
CCSID 1200

The CL command for resynchronization.

Contains the null value if RESYNC_TYPE is not CL COMMAND.

OLD_SYSTEM_OBJECT_SCHEMA CHAR(10)

Old library of object to resynchronize when this is a move or rename request.

Contains the null value if this is not a move or rename.

OLD_SYSTEM_OBJECT_NAME CHAR(10)

Old system name of object to resynchronize when this is a move or rename request.

Contains the null value if this is not a move or rename.

OLD_MEMBER_NAME CHAR(10)

Member name to resynchronize for a database file when this is rename of a member.

Contains the null value if this is not a rename member.

PROGRAM_LIBRARY CHAR(10) Name of library of the program to call to resynchronize this entry.

Contains the null value if RESYNC_TYPE is not PROGRAM CALL.

PROGRAM_NAME CHAR(10) Name of program to call to resynchronize this entry.

Contains the null value if RESYNC_TYPE is not PROGRAM CALL.

RESYNC_NUMBER INTEGER Identifies a group of entries.
DEFERRED_NUMBER INTEGER If RESYNC_DEFERRED is RCL DEFERRED or DEFERRED, identifies the entries that are processed together. For example, if a RSTOBJ restores five objects, all five entries will contain the same DEFERRED_NUMBER.

Contains the null value if this is not a RCL DEFERRED or DEFERRED entry.

CHANGED_ROW_ESTIMATE BIGINT If RESYNC_TYPE is DB I/O, this indicated the estimated number of rows that must be processed.

Contains the null value until resynchronization pre-processing completes.

RESYNC_DATA BLOB(16M) The data necessary to perform the resynchronization operation.

Contains the null value if additional information not needed for operation.

Example

  • Show any conflicting entries in the RESYNC_STATUS views between the two nodes.
    SELECT * FROM TABLE (QSYS2.COMPARE_RESYNC_STATUS () );