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.
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.
- *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.
| Column Name | Data Type | Description |
|---|---|---|
| LOCATION | CHAR(6) | The location of the RESYNC_STATUS entry.
|
| 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:
|
| 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.
|
| 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:
|
| 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.
|
| 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 () );
