Start of change

MIRROR_VERSION_LIST view

The MIRROR_VERSION_LIST view returns information about the Mirror Version List (MVL). The view returns one row for each registered version information entry for a specific feature or function.

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

  • *EXECUTE authority on the QSYS2 library.
  • *OBJOPR and *READ authority on QSYS2/MVL_INFO.
  • For the authority needed to use this view, see Authorization.

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

Table 1. MIRROR_VERSION_LIST view
Column Name System Column Name Data Type Description
ENTRY_NUMBER ENTRY_ID BIGINT A system assigned value that uniquely identifies this entry in the MVL.
STATE STATE VARCHAR(14) The state of this version entry in the MVL.
ACTIVE
This version entry contains the active version identifier used by both nodes.
APPLIED ADD
This version entry is an addition to the MVL that is eligible to be activated into an active state.
APPLIED REMOVE
This version entry describes a removal from the MVL that is eligible to be activated into an active state so that the removal can be processed.
PENDING ADD
This version entry is an addition to the MVL that has not been promoted to an applied state. This version entry has no impact on the QSYS2.CHECK_MIRROR_VERSION function.
PENDING REMOVE
This version entry describes a removal from the MVL that has not been promoted to an applied state. This version entry has no effect on the active version until this entry is first promoted to an applied state.
ENTRY_SOURCE SOURCE VARCHAR(6) Indicates the source of this version entry.
SYSTEM
The version entry was added by the IBM® i operating system using an internal operating system interface.
USER
The version entry was added by a user.
VERSION_GROUP GROUP_NAME VARCHAR(10) A text string used to associate related version names together. An application can have multiple version names that share the same group name to allow version information to be updated and committed together in the same group.
VERSION_NAME NAME VARCHAR(30) A text string used to identify a version entry within a group. All activated version entries with the same VERSION_GROUP and VERSION_NAME are evaluated when calculating the ACTIVE_VERSION, PRIMARY_VERSION, and SECONDARY_VERSION.
ACTIVE_VERSION ACTIVE VARCHAR(11)
Nullable
The version identifier that is actively used by both nodes. This is the highest version value that is available on both nodes. The format is xxx.yyy.zzz, where:

xxx: The major version number. This value is always present for a version number.

yyy: An optional minor version number.

zzz: An optional revision version number.

Contains the null value when STATE is not ACTIVE or the version entry represents an active version.

PRIMARY_VERSION PRIMARY VARCHAR(11)
Nullable
The version identifier awaiting promotion from the primary node. The format is xxx.yyy.zzz.

Contains the null value when no version exists on the primary node.

SECONDARY_VERSION SECONDARY VARCHAR(11)
Nullable
The version identifier awaiting promotion from the secondary node. The format is xxx.yyy.zzz.

Contains the null value when no version exists on the secondary node.

ACTIVATION_TIME ACTIVATION VARCHAR(9)
Nullable
Indicates when this version entry can be activated from an APPLIED ADD or APPLIED REMOVE state to an ACTIVE state.
IMMEDIATE
This version entry can be activated immediately once it has been promoted to an applied state.
RESUME
This version entry can be activated the next time replication is resumed once it has been promoted to an applied state.

Contains the null value when STATE is ACTIVE.

TEXT_DESCRIPTION TEXT VARGRAPHIC(50) CCSID 1200
Nullable
Description of the version entry.

Contains the null value if no description exists for the version entry.

CHANGE_TIMESTAMP CHANGE_TS TIMESTAMP The timestamp when this version entry was created or changed.

Examples

  • List all active user supplied version information entries for group name SOFTVEND01.
    SELECT * FROM QSYS2.MIRROR_VERSION_LIST 
        WHERE ENTRY_SOURCE = 'USER' AND 
              STATE = 'ACTIVE' AND
              VERSION_GROUP = 'SOFTVEND01'
        ORDER BY VERSION_GROUP, VERSION_NAME;
  • List all user supplied pending version information entries for group name SOFTVEND02 that are still waiting to be applied and activated.
    SELECT * FROM QSYS2.MIRROR_VERSION_LIST 
        WHERE VERSION_GROUP = 'SOFTVEND02' AND 
              STATE IN ('PENDING ADD', 'PENDING REMOVE');
  • List the entry number for all version information entries for group name SOFTVEND03 with version name APPLICATION_LIBRARY_03 that are not a part of the current active version. The entry numbers can be used to remove specific version information entries that are still in an applied or pending state with QSYS2.REMOVE_MIRROR_VERSION procedure.
    SELECT * FROM QSYS2.MIRROR_VERSION_LIST
        WHERE VERSION_GROUP = 'SOFTVEND03' AND 
              VERSION_NAME = 'APPLICATION_LIBRARY_03' AND 
              STATE NOT IN ('ACTIVE')
        ORDER BY ENTRY_NUMBER;
  • List version information entries that will be applied the next time replication is resumed.
    SELECT * FROM QSYS2.MIRROR_VERSION_LIST 
        WHERE STATE LIKE 'APPLIED%' AND 
              ACTIVATION_TIME = 'RESUME';
End of change