Collecting trace data
Db2 traces are activated and terminated transparently to the user as needed to satisfy trace requests.
When MainView for DB2 first establishes a connection to a target Db2 subsystem (at BBI-SS PAS startup or at Db2 startup), it uses the Instrumentation Facility Interface (IFI) to reserve one OPx destination (where OPx is an internally defined OP1 to OP8 Db2 buffer). The BBI-SS PAS has a Db2 thread but it is inactive.
Multiple traces can be started with different selection criteria that are specified with the ATRAC request. A maximum of four detail traces per Db2 subsystem and multiple summary traces (all summary traces share a single OPx destination) can be requested. If four detail traces and 20 summary traces are started for the same Db2 subsystem, five (maximum) OPx destinations are used. Db2 has a maximum allowable number of eight OPx destinations for the entire Db2 subsystem. The MainView for DB2 trace maximum limits the number of trace destinations that are used for the target Db2 by the BBI-SS PAS.
When the first application trace or workload monitor request for a Db2 subsystem is activated, MainView for DB2 issues the MODIFY TRACE command to request the IFCID (Instrumentation Facility Component Identifier) 3 records. If a Db2 accounting trace level is already active in Db2, the existing records are passed on by Db2 to this additional destination. If no accounting trace levels are active, the IFCID 3 records that are passed to MainView for DB2 contain the corresponding data fields for the Db2 accounting classes that are specified by the ACCTG parameter in BBPARM member DMRBEXxx. The default is class 1 only. For more information, see Customizing-after-installation.
When all application trace or workload monitor requests are stopped, the MODIFY TRACE command is issued again to remove the request for IFCID 3, which quiesces Db2 IFI processing.
At BBI-SS PAS or Db2 shutdown, MainView for DB2 issues a STOP TRACE(MON) TNO(x) command through the MVS command interface.
Summary and detail trace entries are identified by a Db2 accounting record and are made available for display when this record is received. For detail trace entries, data for incomplete threads is available before the accounting record is received. These entries are displayed in LTRAC with a status of INC. STRAC does not have accounting data for these entries, but the summaries and the DTRAC detail events can be displayed.
Summary and detail trace entries are identified by a Db2 accounting record and are made available for display only when this record is received. To view detail trace data for an active thread, EXPAND from the DUSER display for that thread to UTRAC (see UTRAC-User-Detail-Trace). The trace entries are often referred to as transactions because there can be more than one accounting record per thread.
This section contains the following topics:
Related topic