Starting the audit trace

You can start an audit trace at any time or specify that an audit trace starts automatically whenever Db2 is started.

About this task

The default option for the AUDITST subsystem parameter is NO. When NO is specified, audit traces do not start automatically.

Procedure

To start an audit trace, choose one of the following options:

  • Set the AUDITST subsystem parameter to * (an asterisk).
    This will cause a complete audit trace to start automatically whenever Db2 is started.
  • Set the AUDITST subsystem parameter to YES.
    This will cause an audit trace for the default class (class 1: access denials) and the default destination (the SMF data set) to start automatically whenever Db2 is started.
  • Set the AUDITST subsystem parameter to a list of those classes (for example, 1,3,5).
    This will cause an audit trace for specific audit trace classes to start automatically whenever Db2 is started.
  • Issue the START TRACE command at any time.
    This will cause an audit trace to start. You can choose the audit classes to trace and the destination for trace records. You can also include an identifying comment.
    The following command starts an audit trace for classes 4 and 6 with distributed activity: Begin general-use programming interface information.
    -START TRACE (AUDIT) CLASS (4,6) DEST (GTF) LOCATION (*)
      COMMENT ('Trace data changes; include text of dynamic DML statements.')
    End general-use programming interface information.