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.
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.
|
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:
When ENTRY_TYPE is V:
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.
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:
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:
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.
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';