AUDIT_JOURNAL_M7 (Db2 Mirror Replication Services) table function

The AUDIT_JOURNAL_M7 table function returns rows from the audit journal that contain information from the M7 (Db2® Mirror Replication Services) journal entries.

Every audit journal table function shares a common authorization requirement and a common set of parameters. These are described in AUDIT JOURNAL table function common information.

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

Table 1. AUDIT_JOURNAL_M7 table function
Column Name Data Type Description
The first columns returned by this table function are from the common audit journal entry header. See Common columns returned from the audit journal entry header for the column definitions. After the common columns are the following columns that describe the entry specific data for the M7 audit journal entry.
ENTRY_TYPE CHAR(1) The type of entry.
A
Add active replication criteria rule
D
Duplicate replication criteria rules (a rename library was performed)
P
Activate pending replication criteria rules
R
Remove active replication criteria rule
S
Resynchronization of eligible objects
U
User deferred or deleted entries in the Object Tracking List (OTL) using the QSYS2.CHANGE_RESYNC_ENTRIES procedure
V
Generic versioning
ENTRY_TYPE_DETAIL VARCHAR(200) Descriptive text that corresponds to the entry type.
ACTION VARCHAR(7) When ENTRY_TYPE is A, P, R, S, or U the type of resynchronization action to performed:
INITIAL
Initial synchronization of newly replicated objects.
RECLONE
Resynchronization of actively replicating objects.
RESUME
Resynchronization of objects that are on the OTL because the node was previously blocked.

When ENTRY_TYPE is V:

ADD
Register (add) an applied version information entry for a specific feature or function in the Mirror Version List (MVL).
APPLY
Apply pending version information entries.
REMOVE
Unregister (remove) an applied version information entry from the Mirror Version List (MVL).
REFRESH
Refresh the version information entries in Mirror Version List by running user specified version handlers.

Contains the null value if ENTRY_TYPE is D.

ACTION_DETAIL VARCHAR(200) Descriptive text that corresponds to the action.

Contains the null value if ACTION is null.

RULE_IDENTIFIER BIGINT Identifier for this replication criteria rule.

Contains the null value if ENTRY_TYPE is not A, D, or R.

INCLUSION_STATE VARCHAR(10) The inclusion state of the replication criteria rule.
DEFINITION
Objects that best match this replication criteria rule are replicated. Only the definition of the object is replicated.
EXCLUDE
Objects that best match this replication criteria rule are not replicated.
INCLUDE
Objects that best match this replication criteria rule are replicated.

Contains the null value if ENTRY_TYPE is not A or D.

IASP_NAME VARCHAR(10) The name of the ASP group associated with this replication criteria rule, the replicated object, or the SQL QSYS2.CHANGE_RESYNC_ENTRIES procedure. Can contain the special value *SYSBAS.

Contains the null value if ENTRY_ TYPE is V.

LIBRARY_NAME VARCHAR(10) The library name associated with the replication criteria rule, the replicated object, or the SQL QSYS2.CHANGE_RESYNC_ENTRIES procedure. Can contain the special value *ALL.

Contains the null value if IASP_NAME is null.

OBJECT_TYPE VARCHAR(8) The object type associated with the replication criteria rule, the replicated object, or the SQL QSYS2.CHANGE_RESYNC_ENTRIES procedure. Can contain the special value *ALL.

Contains the null value if LIBRARY_NAME is null.

OBJECT_NAME VARCHAR(10) The name of the object associated with this replication criteria rule, the replicated object, or the QSYS2.CHANGE_RESYNC_ENTRIES procedure.

Contains the null value if OBJECT_TYPE is null.

ORIGINAL_LIBRARY_NAME VARCHAR(10) Original library name.

Contains the null value if ENTRY_TYPE is not D.

SYSTEM_VALUE VARCHAR(10) The name of the system value associated with this replication criteria rule.

Contains the null value if ENTRY_TYPE is not A or R, or if OBJECT_NAME or ENVIRONMENT_VARIABLE is not null.

ENVIRONMENT_VARIABLE VARCHAR(128) The name of the environment variable associated with this replication criteria rule.

Contains the null value if OBJECT_NAME or SYSTEM_VALUE is not null.

APPLY_LABEL VARCHAR(26) The label used to identify replication criteria rules.

Contains the null value if ENTRY_TYPE is D, S, or U.

NUMBER_OF_OBJECTS BIGINT The number of Save/Restore entries added to the OTL for objects affected by this operation.

Contains the null value if ENTRY_TYPE is not A, P, R, or S.

AFFECTED_ROWS BIGINT The number of OTL rows affected by the SQL QSYS2.CHANGE_RESYNC_ENTRIES procedure.

Contains the null value if ENTRY_TYPE is not U.

VERSION_ENTRY_NUMBER BIGINT The version entry number.

Contains the null value if ENTRY_TYPE is not V, or ENTRY_TYPE is V but ACTION is not ADD or REMOVE.

VERSION_GROUP VARCHAR(10) The version group.

Contains the null value if ENTRY_TYPE is not V.

VERSION_NAME VARCHAR(30) The version name. Can contain the following special value:
*ALL
All version names in VERSION_GROUP are operated on.

Contains the null value if ENTRY_TYPE is not V.

VERSION_IDENTIFIER VARCHAR(11) The version identifier. The format is xxx.yyy.zzz where each piece of the version contains the digits 0-9:
xxx
The major version number. This value is always present for a version number.
yyy
An optional minor version number.
zzz
An optional revision number.

Contains the null value if ENTRY_TYPE is not V, or ENTRY_TYPE is V but ACTION is not ADD or REMOVE.

VERSION_ACTIVATION_TIME VARCHAR(9) The version entry activation state indicator.
IMMEDIATE
This version entry can be activated immediately from an applied state.
RESUME
This version entry can be activated from an applied state the next time replication is resumed.

Contains the null value if ENTRY_TYPE is not V, or ENTRY_TYPE is V but ACTION is not ADD or REMOVE.

Example

  • List any replication changes that affected APPLIB1 this week.
    
    SELECT * FROM TABLE(
      SYSTOOLS.AUDIT_JOURNAL_M7(  
          STARTING_TIMESTAMP => CURRENT TIMESTAMP - 7 DAYS
      )
    )
    WHERE LIBRARY_NAME = 'APPLIB1';