RESYNC_STATUS view
The RESYNC_STATUS view returns information from the Object Tracking List (OTL).
- Tracked entries that have not yet been processed, normally due to the other node not being available.
- Historical entries that describe operations that have been processed by previous resynchronizations.
- 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.
| 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:
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.
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:
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.
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.
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;
BEGIN MARKER