RESYNC_STATUS view

The RESYNC_STATUS view returns information from the Object Tracking List (OTL).

The view returns three types of information:
  1. Tracked entries that have not yet been processed, normally due to the other node not being available.
  2. Historical entries that describe operations that have been processed by previous resynchronizations.
  3. Priority entries that describe the suggested priority for an object or set of objects as defined by using the QSYS2.SET_RESYNC_PRIORITIES procedure.

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

  • *EXECUTE authority on the QRECOVERY library.
  • *OBJOPR and *READ authority on QRECOVERY/QADBRSYSTS.

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

Table 1. RESYNC_STATUS view
Column Name System Column Name Data Type Description
SYSTEM_OBJECT_SCHEMA SYS_DNAME
CHAR(10)
Nullable
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 SYS_ONAME
VARCHAR(128)
Nullable
The system name of the object to resynchronize. For rename requests, this is the new name for the object.

For a suggested priority entry, can contain the special value *ALL.

Contains the null value if SYSTEM_OBJECT_TYPE is *SECATR.

SYSTEM_OBJECT_TYPE SYS_OTYPE VARCHAR(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

For a suggested priority entry, can contain the special value *ALL.

MEMBER_NAME MBRNAME
CHAR(10)  
Nullable
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 PRIORITY
SMALLINT
Nullable
Priority 0 is the highest priority.

For a user-specified priority entry, indicates the priority set by using the QSYS2.SET_RESYNC_PRIORITIES procedure to influence the order in which resynchronization will be performed.

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.

Db2® Mirror considers many factors when determining the order of resynchronization, including object dependencies and the suggested priority.

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

RESYNC_TYPE RESYNCTYP
VARCHAR(13)
Nullable
The technology used to resynchronize this object.
CL COMMAND
A CL command will be used.
Start of changeBEGIN MARKEREnd of change
Start of changeInformational entry identifying the beginning of a block of entries within the OTL.End of change
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.
DTAQ CHANGE
The mechanism for changing data queues will be used.
Start of changeEND MARKEREnd of change
Start of changeInformational entry identifying the end of a block of entries within the OTL.End of change
Start of changeEVENT MARKEREnd of change
Start of changeInformational entry identifying an event within the OTL.End of change
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.
USROBJ CHANGE
The mechanism for changing user spaces or user indexes will be used.

Contains the null value if the entry is a suggested priority entry.

RESYNC_TYPE_DESCRIPTION RESYNCTX
VARCHAR(300)  
Nullable
Text description that further describes RESYNC_TYPE.

Contains the null value if the entry is a suggested priority entry.

TRACKING_TIME TRACKTIME TIMESTAMP(12) Timestamp when the entry was added.
RESYNC_STARTTIME STARTTIME
TIMESTAMP
Nullable
Timestamp when resynchronization started for the entry.

Contains the null value if resynchronization has not started or if the entry is a suggested priority entry.

RESYNC_ENDTIME ENDTIME
TIMESTAMP
Nullable
Timestamp when resynchronization completed for the entry.

Contains the null value if resynchronization has not completed or if the entry is a suggested priority entry.

TRACKING_REASON REASON
VARCHAR(19)
Nullable
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.
SOFTWARE RECLONE
This object was replicated or a change was made to this object for a software reclone.
Start of changeSYSTEM MIGRATIONEnd of change
Start of changeThis object was synchronized for a system migration.End of change
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.

Contains the null value if the entry is a suggested priority entry.

JOB_NAME JOB_NAME
CHAR(28)  
Nullable
The qualified job name that added this tracking entry.

Contains the null value if the entry is a suggested priority entry.

FAILURE_MESSAGE FAILURE
CHAR(7)
Nullable
Failure message ID for failed resynchronization for this entry.

Contains the null value if resynchronization has not failed or if the entry is a suggested priority entry.

RESYNC_GROUP RESYNCGRP
INTEGER
Nullable
Identifier for a group of one or more objects that are preprocessed together.

Contains the null value if the entry is a suggested priority entry.

RESYNC_DEFERRED RESYNCDFR
VARCHAR(15)
Nullable
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. This entry cannot be removed execpt by doing a reclone.

Contains the null value if the entry is a suggested priority entry.

RESYNC_CL_COMMAND RESYNCCL
DBCLOB(32702)
CCSID 1200
Nullable

The CL command for resynchronization.

Contains the null value if RESYNC_TYPE is not CL COMMAND or if the entry is a suggested priority entry.

OLD_SYSTEM_OBJECT_SCHEMA OSYS_DNAME
CHAR(10)  
Nullable

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, or if the entry is a suggested priority entry.

OLD_SYSTEM_OBJECT_NAME OSYS_ONAME
CHAR(10)
Nullable

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, or if the entry is a suggested priority entry.

OLD_MEMBER_NAME OMBRNAME
CHAR(10)  
Nullable

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 or if the entry is a suggested priority entry.

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

Contains the null value if RESYNC_TYPE is not PROGRAM CALL or if the entry is a suggested priority entry.

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

Contains the null value if RESYNC_TYPE is not PROGRAM CALL or if the entry is a suggested priority entry.

RESYNC_NUMBER RESYNCNBR
INTEGER
Nullable
Identifies a group of entries.
  • When the replication state changes to TRACKING, the resync number is incremented.

    All entries generated while in TRACKING state until the replication state changes to ACTIVE have the same resync number. This indicates the group of entries were or will be resynchronized together.

  • When the replication state changes to ACTIVE, the resync number is incremented again.

    All entries added while in ACTIVE state until the replication state changes to TRACKING have the same resync number. This indicates the group of entries that were added for normal replication.

This number can be used on the CHANGE_RESYNC_ENTRIES procedure to change all the entries that resynchronized together.

Contains the null value if the entry is a suggested priority entry.

RESYNC_DEFERRED_GROUP RESYNCDGRP
INTEGER
Nullable
If RESYNC_DEFERRED is RCL DEFERRED or DEFERRED, identifies the entries that are processed together during active replication. For example, if a RSTOBJ restores five objects, all five entries will contain the same RESYNC_DEFERRED_GROUP value.

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

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

Contains the null value until resynchronization pre-processing completes, or if the entry is a suggested priority entry.

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

Contains the null value if additional information not needed for operation or if the entry is a suggested priority entry.

Examples

  • Show all the tracked entries that have not yet been processed.
    SELECT * FROM QSYS2.RESYNC_STATUS   
      WHERE RESYNC_TYPE IS NOT NULL AND ENDTIME IS NULL
      ORDER BY TRACKING_TIME;
  • Show all the historical entries for requests that have been processed.
    SELECT * FROM QSYS2.RESYNC_STATUS   
      WHERE RESYNC_TYPE IS NOT NULL AND ENDTIME IS NOT NULL
      ORDER BY ENDTIME DESC;
  • Show the entries that define user suggested priorities.
    SELECT SYSTEM_OBJECT_NAME, SYSTEM_OBJECT_SCHEMA, SYSTEM_OBJECT_TYPE, SUGGESTED_PRIORITY 
      FROM QSYS2.RESYNC_STATUS   
      WHERE RESYNC_TYPE IS NULL 
      ORDER BY SUGGESTED_PRIORITY;
1 For each IASP, the QADBRSYSTS table exists in library QRCYnnnnnn; the authorization rules apply to these tables as well.