CONFIRM_RECLONED_LIBRARY_DIFFERENCES table function

The CONFIRM_RECLONED_LIBRARY_DIFFERENCES table function returns a row for each replicated object in a library that appears to be different between the two nodes. The differences can be checked for user libraries in SYSBAS or the current IASP, or for all user libraries with tracked entries in the Object Tracking List (OTL) from the most recent software reclone operation.

The software reclone process does not prevent objects from being created, renamed, or moved during the reclone preparation phase. Therefore, it is a best practice to review any differences before and after the software reclone. During a software reclone the OTL is cleared on both the source and copy nodes, so awareness of entries that will be lost should be reviewed prior to the software reclone.

The function will check the existence of replication-eligible objects within every selected library in iasp-name. The library is included in the comparison. If the object exists on both nodes, the last change timestamp will be used to see if the object definitions appear to be the same. This timestamp does not indicate changes to the object content such as identical records in a file. Any differences detected should be verified using the QSYS2.MIRROR_COMPARE_OBJECT function with COMPARE_ATTRIBUTES set to YES.

The columns with _SOURCE in their name indicate values on the node where the table function was queried. Columns with _TARGET in their name indicate values from the other node of the Db2 Mirror pair.

The function can be invoked from either node but the nodes cannot be suspended for maintenance.

When iasp-name is not *SYSBAS, the replication state for SYSBAS must be ACTIVE and the IASP must be available on both nodes.

Authorization: The privileges held by the authorization ID of the statement must include *ALLOBJ special authority. For the authority needed to use this function, see Authorization.

Read syntax diagramSkip visual syntax diagram CONFIRM_RECLONED_LIBRARY_DIFFERENCES ( IASP_NAME =>  iasp-name ,LIBRARY_NAME => library-name )
The schema is QSYS2.
iasp-name
A character or graphic string expression that identifies the name of the auxiliary storage pool (ASP) group used to locate the user libraries to be evaluated. Can contain the following special value:
*SYSBAS
The libraries are associated with the system ASP (ASP 1) and any basic user ASPs (ASPs 2-32).
library-name
A character or graphic string expression that identifies which user libraries are processed. This can either be a single user library name or one of the following special values:
*ALL
The scope includes all user libraries in the ASP specified by iasp-name on either node.
*RECLONE
The scope is limited to all user libraries in the ASP specified by iasp-name with at least one tracked entry in the OTL for an object that was added and later deferred while the most recent software reclone was being processed. This is the default.

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

Table 1. CONFIRM_RECLONED_LIBRARY_DIFFERENCES table function
Column Name Data Type Description
LIBRARY_NAME VARCHAR(10) Name of the library that contains the object.
OBJECT_NAME VARCHAR(128) System name of the object, system-level environment variable, or system value.
OBJECT_TYPE VARCHAR(8) Type of object.
Supported types are:
*DTAARA
Data area
*DTAQ
Data queue
*ENVVAR
System-level environment variable
*FILE
Database file
*JOBD
Job description
*JOBQ
Job queue
*JRN
Journal
*LIB
Library
*OUTQ
Output queue
*PGM
Program
*SQLPKG
SQL package
*SQLUDT
SQL user-defined type
*SQLXSR
SQL XML schema repository
*SRVPGM
Service program
*SYSVAL
System value
*USRIDX
User index
*USRSPC
User space
OBJECT_ON_SOURCE VARCHAR(3) Indicates whether the object was found on the source node.
NO
This object was not found on the source node.
YES
This object was found on the source node.
OBJECT_ON_TARGET VARCHAR(3) Indicates whether the object was found on the target node.
NO
This object was not found on the target node.
YES
This object was found on the target node.
CHANGE_TIMESTAMP_ON_SOURCE TIMESTAMP(0) The timestamp of the last time the object was changed on the source node.

Contains the null value if the object is not found on the source node or if the object type does not maintain a change timestamp.

CHANGE_TIMESTAMP_ON_TARGET TIMESTAMP(0) The timestamp of the last time the object was changed on the target node.

Contains the null value if the object is not found on the target node or if the object type does not maintain a change timestamp.

Examples

  • Save a list of replicated objects that are different between the nodes for user libraries that reside in SYSBAS.
    CREATE TABLE MYLIB.RECLONE_LIB_DIFF AS (
      SELECT * FROM TABLE(QSYS2.CONFIRM_RECLONED_LIBRARY_DIFFERENCES(
                                               IASP_NAME => '*SYSBAS',
                                               LIBRARY_NAME => '*ALL'))
        ORDER BY LIBRARY_NAME, OBJECT_NAME, OBJECT_TYPE)
      WITH DATA;
  • List all of the objects with differences for user libraries that were changing while a software reclone of SYSBAS was being performed.
    SELECT * FROM TABLE(QSYS2.CONFIRM_RECLONED_LIBRARY_DIFFERENCES(
                                          IASP_NAME => '*SYSBAS',
                                          LIBRARY_NAME => '*RECLONE'))
      ORDER BY LIBRARY_NAME, OBJECT_NAME, OBJECT_TYPE;