MIRROR_DISPLAY_JOURNAL table function
The MIRROR_DISPLAY_JOURNAL table function formats Db2® Mirror specific audit journal entries as well as returning typical audit journal information.
Authorization: The privileges held by the authorization ID of the statement must include *AUDIT special authority. For the authority needed to use this function, see Authorization.
starting-timestamp
A timestamp value that specifies the starting timestamp to use1.
If no starting timestamp is specified, CURRENT DATE - 1 DAY is used.
ending-timestamp
A timestamp value that specifies the ending timestamp to use1.
If no ending timestamp is specified, CURRENT TIMESTAMP is used.
- user-profile
-
A character or graphic string expression that identifies the user profile name for the current user of the job. If user-profile is not specified, *ALL is used.
- journal-entry-types
-
A character or graphic string expression that lists the journal entry types to return. The supported journal-entry-types are: M0, M6, M7, M8, and M9. Multiple entry types can be requested for a single invocation by separating the entry type values with a blank or a comma. For example: 'M6', 'M0, M9', or 'M7 M8 M9'. See Layout of audit journal entries for detailed information about these journal entries.
If no journal-entry-types are provided, all Db2 Mirror journal entry types are returned.
The result of the function is a table containing rows with the format shown in the following table. All columns are nullable.
Column Name | Data Type | Description |
---|---|---|
ENTRY_TIMESTAMP | TIMESTAMP | The system date and time when the audit journal entry was added to the journal receiver. |
![]() ![]() |
![]() ![]() |
![]() ![]() |
DETAIL | VARCHAR(200) | The details from the audit journal entry. In some cases it includes information formatted as topic = value. |
TARGET | VARCHAR(10) | Name of the independent ASP group associated with this audit
journal entry. Contains either the name of the ASP group or the following special value
|
![]() ![]() |
![]() ![]() |
![]() ![]() |
SEQUENCE_NUMBER | DECIMAL(21,0) | A number assigned by the system to each journal entry. |
CURRENT_USER | VARCHAR(10) | The name of the effective user profile under which the job was running when the entry was created. |
JOB_NAME | VARCHAR(10) | The name of the job that added the entry. |
JOB_USER | VARCHAR(10) | The user profile name of the user that started the job. |
JOB_NUMBER | VARCHAR(6) | The job number of the job that added the entry. |
PROGRAM_NAME | VARCHAR(10) | The name of the program that added the entry. |
PROGRAM_LIBRARY | VARCHAR(10) | The name of the library that contains the program that added the journal entry. |
PROGRAM_LIBRARY_ASP_DEVICE | VARCHAR(10) | The name of the ASP device that contains the program. |
PROGRAM_LIBRARY_ASP_NUMBER | INTEGER | The number for the auxiliary storage pool that contains the program that added the journal entry. |
REMOTE_PORT | INTEGER | The port number of the remote address associated with this journal entry. |
REMOTE_ADDRESS | VARCHAR(46) | The remote address associated with the journal entry. |
SYSTEM_NAME | VARCHAR(8) | The name of the system on which the entry is being retrieved. |
SYSTEM_SEQUENCE_NUMBER | DECIMAL(21,0) | The system sequence number indicates the relative sequence of when this journal entry was deposited into the journal. |
RECEIVER_NAME | VARCHAR(10) | The name of the receiver holding the journal entry. |
RECEIVER_LIBRARY | VARCHAR(10) | The name of the library containing the receiver holding the journal entry. |
RECEIVER_ASP_DEVICE | VARCHAR(10) | The name of the ASP device containing the receiver holding the journal entry. |
RECEIVER_ASP_NUMBER | INTEGER | The number for the auxiliary storage pool containing the receiver holding the journal entry. |
JOURNAL_CODE | CHAR(1) | The primary category of the journal entry. |
JOURNAL_ENTRY_TYPE | CHAR(2) | Further identifies the type of user-created or system-created entry. |
ARM_NUMBER | INTEGER | The number of the disk arm that contains the journal entry. |
Notes
![Start of change](./delta.gif)
- AUDIT_JOURNAL_M0 table function
- AUDIT_JOURNAL_M6 table function
- AUDIT_JOURNAL_M7 table function
- AUDIT_JOURNAL_M8 table function
- AUDIT_JOURNAL_M9 table function
![End of change](./deltaend.gif)
Examples
- Review all Db2 Mirror audit journal entries from yesterday and today.
SELECT * FROM TABLE(QSYS2.MIRROR_DISPLAY_JOURNAL()) ORDER BY ENTRY_TIMESTAMP DESC;