This section describes the SQLACTIVITY command with the TRACE subcommand.
Use the TRACE subcommand to produce traces with an entry for every DB2® SQL event.
>>-TRACE--+-------------------------------------------+-------->< '-+-| FROM/TO block |---------------------+-' | .-,--------------. | | V .-OCCURRENCE-. | | +-SUMMARIZEBY--(----+-ALL--------+-+--)-+ | +-CURSOR-----+ | | +-PROGRAM----+ | | +-STMTNO-----+ | | '-STMTTYPE---' | | .-DEFAULT-----. | +-SORTBY--(--+-ELAPSEDTIME-+--)---------+ | +-EXITS-------+ | | +-EXITTIME----+ | | +-IOREQS------+ | | +-IOTIME------+ | | +-PAGESCAN----+ | | +-ROWSPROC----+ | | +-SCANS-------+ | | +-SORTRECS----+ | | +-SORTWORK----+ | | +-SUSP--------+ | | +-SUSPTIME----+ | | '-TCBTIME-----' | | .-,----------. | | V .-NONE---. | | +-WORKLOAD--(----+-ACCT---+-+--)--------+ | +-ALL----+ | | +-DCAP---+ | | +-EXIT---+ | | +-HILITE-+ | | +-IO-----+ | | +-LOCK---+ | | +-SCAN---+ | | +-SORT---+ | | '-VARS---' | | .-10------. | +-LIMIT--(--+-integer-+--)--------------+ | .-SQTRCDD*-. | +-DDNAME--(--+-ddname---+--)------------+ '-| INCLUDE/EXCLUDE block |-------------'
The syntax diagram shows the options that are available with this subcommand. See OMEGAMON XE for DB2 PE subcommand options for comprehensive descriptions of these options. The following list gives additional or specific descriptions of selected options, where appropriate.
For details, see FROM/TO subcommand options.
For more information about summarization, see the Reporting User's Guide.
For more information about sorting and default, see the Report Reference.
Including MINIBIND if IFCID 22 is included in the input.
Including UDF activity if IFCID 324 is included in the input.
Note that the more workload detail you request, the more time OMEGAMON® XE for DB2 PE requires for processing your request. It is recommended that you do not specify WORKLOAD(ALL) with a large amount of input data unless absolutely necessary.
If option WORKLOAD(VARS) is specified, option SUMMARIZEDBY(OCCURRENCE) is required (the default).
For more information about workload detail, see the Reporting User's Guide and the Report Reference.
For details, see INCLUDE and EXCLUDE subcommand options, which lists other identifiers allowed with this command and subcommand combination, and OMEGAMON XE for DB2 PE identifiers.
In addition to the common identifiers used with these options, the SQLACTIVITY TRACE command also has an SQLCODE identifier. This identifier can be used to include statements that completed, for example, with a specific error. The following are usage examples of the SQLCODE identifier.
·
·
·
TRACE FROM (,08:00:00.00) TO (,08:10:00.00) SUMMARIZEBY (STMTNO) SORTBY (ELAPSEDTIME) LIMIT (20) INCLUDE (PRIMAUTH(UID0001 UID0003 UID0005) PLANNAME(PLIT2A01,PLIT2A02))
·
·
·
It is summarized by statement number and sorted by elapsed time.
It reports the ten-minute period from 8:00 a.m. to 8:10 a.m. and includes only data that contains any of the following primary authorization IDs:
Using any of the following plan names:
LIMIT has set the maximum number of threads processed to 20.
The trace is written to the data set defined by the default ddname SQTRCDD1.