Stopping the audit trace

You can have multiple traces that run at the same time, including more than one audit trace. You can stop a particular trace by issuing the STOP TRACE command with the same options that you use for START TRACE.

Procedure

Begin general-use programming interface information.To stop a specific trace, use the following approaches:

  • Issue the STOP TRACE command and included the options to uniquely identify a particular trace.
    -STOP TRACE (AUDIT) CLASS (4,6) DEST (GTF)
  • If you did not save the START command, use DISPLAY TRACE to determine the trace number to stop.
    For example, dISPLAY TRACE (AUDIT) might return a message like the following output:
    TNO  TYPE     CLASS         DEST     QUAL
    01   AUDIT    01            SMF      NO
    02   AUDIT    04,06         GTF      YES

    The message indicates that two audit traces are active. Trace 1 traces events in class 1 and sends records to the SMF data set. Trace 1 can be a trace that starts automatically whenever Db2 starts. Trace 2 traces events in classes 4 and 6 and sends records to GTF.

    You can stop either trace by using its identifying number (TNO). For example, the following command stops trace 1:

    -STOP TRACE AUDIT TNO(1)
    End general-use programming interface information.