Controlling Db2 trace data collection

Db2 provides commands for controlling the collection of trace data.

Before you begin

Begin general-use programming interface information.To use the trace commands, you must have one of the following types of authority:

  • SYSADM or SYSOPR authority
  • Authorization to issue start and stop trace commands (the TRACE privilege)
  • Authorization to issue the display trace command (the DISPLAY privilege)

About this task

For descriptions of the Db2 trace types, see Types of Db2 traces.

Procedure

To control Db2 traces, use the following approaches:

  • Issue the following trace commands for the action that you want to take:

    You can specify other parameters to further qualify the scope of a trace. You can trace specific events within a trace type, and events within specific Db2 plans, authorization IDs, resource manager IDs, and locations. You can also control the destination for the trace data.

  • You can specify certain trace types and classes to start automatically when Db2 starts by setting the following subsystem parameters:

    For more information about these and other subsystem parameters that control Db2 traces, see DSNTIPN: Tracing parameters panel.