DB2 Version 9.7 for Linux, UNIX, and Windows

AM_BASE_RPTS table function - Activity monitor reports

The AM_BASE_RPTS table function returns activity reports used by the activity monitor.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-AM_BASE_RPTS--(--report_id--,--type--,--client_locale--)----><

The schema is SYSPROC.

Table function parameters

report_id
An input argument of type INTEGER that specifies a unique report ID. If the argument is null, reports with any report ID are returned.
type
An input argument of type CHAR(4) that specifies the report type. Valid values are:
APPL
Application
STMT
SQL statement
TRAN
Transaction
CACH
Dynamic SQL statement cache
Values can be specified in uppercase or lowercase characters. If the argument is null or an empty string, reports of any type are returned.
client_locale
An input argument of type VARCHAR(33) that specifies a client language identifier. If the argument is null or an empty string, or the message files for the specified locale are not available on the server, 'En_US' is used.

Authorization

EXECUTE privilege on the AM_BASE_RPTS table function.

Examples

Example 1:
SELECT * FROM TABLE(SYSPROC.AM_BASE_RPTS(CAST(NULL AS INTEGER),
   CAST(NULL AS CHAR(4)), CAST(NULL AS VARCHAR(33)))) AS REPORTS
Example 2:
SELECT ID, NAME FROM TABLE(SYSPROC.AM_BASE_RPTS(
   CAST(NULL AS INTEGER), CAST('STMT' AS CHAR(4)), 'En_US')) 
   AS REPORTS WHERE TYPE = 'STMT'

Information returned

Table 1. Information returned by the AM_BASE_RPTS table function
Column name Data type Description
ID INTEGER The unique report ID.
TYPE CHAR(4) The report type. Valid values are: APPL, STMT, TRAN, CACH.
NAME VARCHAR(256) The name or short description of the report.
DESCRIPTION VARCHAR(16384) The detailed description of the report.
SWITCHES VARCHAR(100) The monitor switches required for this report.