DB2 Server for VSE & VM: Operation


Starting a Trace

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:

To activate a trace in multiple user mode, enter the TRACE operator command:



>>-TRACE ON----+-cuu-------+---+------+---+--------------+-----><
               |      (1)  |   '-DUMP-'   '-TRACEBUF--n--'
               '-DISK------'
 


Notes:



  1. Valid for VSE only.


ON
indicates trace activation. If trace is already active, you must first enter the TRACE OFF command before you can enter the TRACE ON command.

cuu
is the virtual address of the trace device used for trace output. In VM this is specified in the ARITRAC FILEDEF command. The default address is 182. If you are tracing to tape, a tape volume must be mounted and ready on the tape unit. If you are tracing to a CMS file, enter the virtual device number of the minidisk.

DISK (Valid for VSE only)
indicates that trace output is to a DASD SAM file.
Note:You must specify either cuu or DISK.

DUMP
causes a snapshot dump of the VSE partition or VM virtual machine at a particular trace point. If you specify this option, you are prompted for further information as described on page ***.

TRACEBUF n
is an optional parameter that specifies the amount of memory, in kilobytes, that you want to allocate for storing trace records. A trace buffer n kilobytes in size is created. This buffer holds the last n kilobytes of trace information in memory until either a TRACE OFF is issued or the application server ends (normally with an SQLEND, or abnormally). The number of kilobytes, n, can be any integer in the range 0 to 99999. If you specify a value of 0, the trace is written directly to the trace output file. When you enter either TRACE OFF or SQLEND, you may choose not to create the trace output file by including the TRCPURGE parameter. This parameter instructs the database manager to purge the contents of the trace buffer instead of writing it to the output file.

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:

  1. You are prompted to specify the DB2 Server for VSE & VM authorization ID, agent number, or * (for ALL) to indicate the authorization ID or agent structures that you want traced.

    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.

  2. You are prompted by message ARI0087D to specify whether you want to trace the Data Conversion (CONV), Database Storage Subsystem (DBSS), Relational Data System (RDS), Work Unit Manager (WUM), Distributed Relational Resource Manager (DRRM), Storage (STG), Data System Control (DSC), or all of these components. The CONV component performs CCSID and numeric conversion. The RDS component is a compiler and translator for the SQL language. The DBSS component controls and accesses the application server. The DSC component controls communications and agent handling. The STG component controls DB2 Server for VSE & VM system and working storage on the application server side. The WUM and DRRM components support the DB2 Server for VM DRDA protocol. You will not be prompted for WUM or DRRM if PROTOCOL=SQLDS.
  3. For DBSS, RDS, DRRM, and DSC tracing, the system prompts you to specify the list of functions and subcomponents and their trace levels (level 0, 1, or 2). The CONV, WUM, and STG components have no subcomponents; therefore, the system prompts you only for trace levels. For CONV and WUM, if you request tracing at level 0, no tracing is done. If you request tracing at level 1, tracing displays only module entry and exit points. If you request tracing at level 2, tracing displays module entry, report, and exit points. If you request tracing at any level other than 0, 1, or 2, it is an error. For STG, if you request tracing at level 0, no tracing is done. If you request tracing level 1, tracing displays storage trace values that may include amount requested/freed, the storage pointer, and the return code. STG does not have a level 2 trace. For each function or subcomponent, enter the name of the component or function and the level number as follows:



    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.

  4. If you specify DUMP for the TRACE command, you are prompted to specify a CONV, DBSS, RDS, DRRM, WUM, STG, or DSC trace-point number. This causes a snapshot dump of the database partition machine to occur the first time the specified trace point is activated. Snapshot dumps do not occur with subsequent activation of the trace point.

    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.

  5. If you specify TRACEBUF for the TRACE ON command and there is sufficient free storage available to allocate a trace buffer, you will receive a message ARI0154I indicating the amount of contiguous memory available. If the amount of storage n kilobytes specified by the TRACEBUF parameter is not available, then the maximum size of the currently available contiguous storage is displayed in error message ARI0155E and the trace will not be started. You can reenter the TRACE ON command for a different size of trace buffer or not select the trace buffer.
    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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]