DB2 10.5 for Linux, UNIX, and Windows

AM_BASE_RPTS table function - Activity event monitor reports

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

Syntax

Important: The related activity monitor routines have been deprecated in Version 10.1 and might be removed in a future release. For more information, see Activity monitor routines have been deprecated.
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

One of the following authorities is required to execute the routine:
  • EXECUTE privilege on the routine
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

Default PUBLIC privilege

In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.

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 id - cluster caching facility identification monitor element
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.