AUDIT_JOURNAL_M9 table function
The AUDIT_JOURNAL_M9 table function returns rows from the audit journal that contain information from the M9 (Db2® Mirror Replication State) 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 M9 audit journal entry. | ||
ENTRY_TYPE | CHAR(1) | The type of entry.
|
ENTRY_TYPE_DETAIL | VARCHAR(200) | Descriptive text that corresponds to the entry type. |
IASP_NAME | VARCHAR(10) | ASP name for which the replication state changed. Can contain the special value *SYSBAS. |
REPLICATION_STATE | VARCHAR(12) | Db2 Mirror replication state.
|
PREVIOUS_REPLICATION_STATE | VARCHAR(12) | Previous Db2 Mirror replication state.
|
CHANGE_REASON | INTEGER | The reason code corresponding to the replication
state change. See Replication detail
info for the list of reason codes. Contains the null value when REPLICATION_STATE or PREVIOUS_REPLICATION_STATE is NOT MIRRORED. |
CHANGE_REASON_DETAIL | VARCHAR(200) | Descriptive text that corresponds to the reason
code. Contains the null value when REPLICATION_STATE or PREVIOUS_REPLICATION_STATE is NOT MIRRORED. |
Example
- List any reasons that IASP1 suspended replication in the past 24 hours.
SELECT ENTRY_TIMESTAMP, IASP_NAME, REPLICATION_STATE, CHANGE_REASON_DETAIL FROM TABLE( SYSTOOLS.AUDIT_JOURNAL_M9( STARTING_TIMESTAMP => CURRENT TIMESTAMP - 24 HOURS ) ) WHERE REPLICATION_STATE <> 'ACTIVE' AND IASP_NAME = 'IASP1' ORDER BY ENTRY_TIMESTAMP DESC;