In multiple user mode, you can start a trace by using either the TRACE operator command or the TRACCONV, TRACDBSS, TRACRDS, TRACWUM, TRACDRRM, TRACSTG, or TRACDSC initialization parameters. In single user mode, you can use only the TRACCONV, TRACDBSS, TRACRDS, TRACDSC and TRACSTG initialization parameters. In single user mode, the TRACWUM and TRACDRRM parameters are ignored, even if you specify them. You cannot enter the TRACE operator command in single user mode.
This section describes how to start a trace using the TRACE operator command. Appendix A, DB2 Server for VSE & VM Initialization Parameters describes the trace initialization parameters.
Both methods of starting a trace have their advantages. The initialization parameters allow part of the initialization to be traced and do not require any operator command entry. The operator command TRACE ON allows tracing to be started at any time after initialization is complete. It also has options to trace only specific agents or authorization IDs.
In VM, the SQLSTART EXEC issues the following CMS FILEDEF command to define the default trace output file:
FILEDEF ARITRAC TAP2 SL (BLOCK 4096 NOCHANGE
If you want to use different FILEDEF options, enter a CMS FILEDEF command before invoking the SQLSTART EXEC.
Note: | The ddname in the FILEDEF command statement must be ARITRAC. If your tape volume is unlabeled, use only the TAPn and NL parameters. The initialization ends abruptly if end of volume is reached on an unlabeled output tape file. |
If the tape volumes have the standard labels required for multivolume output, use the TAPn and SL parameters. If you require multivolume output, omit the FILEDEF LEAVE and NOEOV parameters. The LEAVE parameter suppresses rewinding before OPEN processing and after CLOSE processing.
For standard label tapes, the CMS LABELDEF command is optional. When you use the CMS LABELDEF command, you must enter it with the ddname ARITRAC parameter prior to invoking the SQLSTART EXEC.
The trace output file can be a tape or a CMS file. You can use both IBM standard tape labels and unlabeled tapes. Tape rewinding is controlled by CMS FILEDEF command parameters. The CMS FILEDEF command supplied by the SQLSTART EXEC assumes tape output with the use of IBM standard tape labels. It also rewinds the tape.
In VSE, to run the trace facility, include statements for the trace output file in your job control that starts the application server. The statements you need vary depending on whether you want the trace output on tape or on disk:
Trace output tape files are created with IBM Standard (EBCDIC) Tape Labels. The trace tape is never rewound except at end-of-volume. You must rewind the tape manually or by using job control statements.
To activate a trace in multiple user mode, enter the TRACE operator command:
>>-TRACE ON----+-cuu-------+---+------+---+--------------+----->< | (1) | '-DUMP-' '-TRACEBUF--n--' '-DISK------'
Notes:
|
Note: | You must specify either cuu or DISK. |
A suggested size for the trace buffer is 100 kilobytes or more. It is recommended that you increase the Virtual Machine memory or virtual storage size of the database partition by the size of trace buffer before you start a trace in memory. See item 5 in the following TRACE command sequence.
After you enter the TRACE command, the application server requests further information by prompting.
Note: | When the prompting messages appear on the DB2 Server for VM operator terminal, the display status area displays "RUNNING" instead of "VM READ". This occurs because the application server continues to service DB2 Server for VM users while it is waiting for the operator reply. |
The application server prompts you for the following information:
For traces, the operator agent is agent 1, the checkpoint agent is agent 2, and the ready/recovery agent is agent 3. The first general purpose agent is agent 4, the second is agent 5, and so on.
The authorization ID for the operator agent is OPERATOR. The authorization ID for the checkpoint agent is CHECKPT. The authorization ID for the ready/recovery agent is RECOVERY. The authorization ID for a general purpose agent is the DB2 Server for VSE & VM authorization ID of the connected user.
component1 level-number1 [component2 level-number2] ... |
For example: Request tracing at level 1 for LUW and level 2 for DC.
LUW 1 DC 2 |
Leave at least one blank between the component name and the level number.
The DBSS functions and subcomponents that you can supply in response to message ARI0090D are:
ENTRY (DBSS entry calls) EXIT (Returns from DBSS entry calls) LOG (Log and Recovery Management) LOCK (Lock Management) LUW (Logical Unit of Work Management) DC (Data Control) DM (Data Manipulation) STOR (Storage Management) SORT (DBSS Sort) INDEX (DBSS Index) STAT (DBSS Update Statistics) * (For all of the above) |
DBSS has unique subcomponents, ENTRY and EXIT, which provide tracing for DBSS calls before entering or after exiting the module.
ENTRY and EXIT tracing at level 1 display only DBSS Call entry or exit points. Tracing at level 2 displays the base control information and auxiliary structures, depending on the DBSS opcode.
The RDS functions and subcomponents you can supply in response to message ARI0088D are:
EXEC (Executives) PA (Parser) OPT (Optimizer) AG (Access Generator) INT (Interpreter and Authorization) AU (Security Audit Trace) SG (Statement Generator) * (For all of the above) |
For information on using the security audit trace facility, refer to the DB2 Server for VSE & VM Database Administration manual.
The DSC functions and subcomponents you can supply in response to message ARI00142D are:
AGENT (Agent handling) COM (Communications) * (For all of the above) |
Tracing the AGENT subcomponent in DB2 Server for VM provides a data stream trace for the application server. You can use it to isolate a DRDA data stream trace. To produce a data stream trace for the application requester, refer to the DB2 Server for VSE & VM Database Administration manual.
The DRRM functions and subcomponents that you can supply in response to message ARI0140D are:
DICT (DDM/FD:OCA Dictionary and FD:OCA descriptors and data) GEN (DDM Generator) PARSE (DDM Parser) RDIIN (RDIIN Manager) * (For all of the above) |
The CONV component has no subcomponents, so in response to message ARI0160D, you supply only trace levels.
The STG component has no subcomponents, so in response to message ARI0162D, you supply only trace levels.
The WUM component has no subcomponents, so in response to message ARI0141D, you supply only trace levels.
The snapshot dump is generated by the CP DUMP command, or the VSE PDUMP macro.
Note: | The function or subcomponent containing the trace point must be activated for tracing to cause activation of the snapshot dump. Also, the type of dump is controlled by the initialization parameter DUMPTYPE. This parameter has three possible values: P, F, or N. F is the default. If you specify P, a partial dump of everything except the DB2 Server for VSE & VM code occurs. If you specify F, a full machine dump occurs. If you specify N, no dump occurs. |
In DB2 Server for VM, partial virtual machine dumps are sent to the virtual printer and full virtual machine dumps are sent to the virtual reader. Refer to the DB2 Server for VSE & VM Diagnosis Guide and Reference manual for dump handling instructions.
Note: | The amount of free storage fluctuates during execution of the DB2 Server for VSE & VM program. If a substantial portion is used by the trace buffer there is a higher probability that an agent may be rolled back or the database system may shutdown because of the lack of storage. |
For traces started by initialization parameters you cannot trace only a selected authorization ID or agent number or dump at a specified trace point.