Accessing event information written by an activity event monitor to a table
Activity event monitors can write
their output to tables, files, and pipes.
For more information
about using data written to files and pipes, see Event monitor self-describing data stream.
Before you begin
About this task
Procedure
To access the data produced by an activity event monitor:
Results
Example
SELECT SUBSTR(B.METRIC_NAME, 1, 20) METRIC_NAME, B.VALUE
FROM ACTIVITY_ACTEVMON AS A,
TABLE(MON_FORMAT_XML_METRICS_BY_ROW(A.DETAILS_XML))AS B
WHERE UOW_ID=23
ORDER BY B.VALUE DESC
This statement returns all
of the activity metrics collected for the unit of work with the UOW_ID
of 23:
For more information about
working with XML data returned by event monitors, see Interfaces that return monitor data in XML documents.METRIC_NAME VALUE
-------------------- --------------------
TOTAL_CPU_TIME 140625
ROWS_READ 977
TOTAL_ACT_TIME 880
STMT_EXEC_TIME 880
COORD_STMT_EXEC_TIME 880
TOTAL_SECTION_PROC_T 880
TOTAL_SECTION_TIME 880
⋮ ⋮
FCM_TQ_SEND_WAITS_TO 0
FCM_MESSAGE_SEND_WAI 0
FCM_SEND_WAITS_TOTAL 0
FCM_RECV_WAITS_TOTAL 0
92 record(s) selected.