Gathering active log records into a buffer

Use the START TRACE command to begin gathering active log records into a buffer.

Procedure

Begin program-specific programming interface information.To gather active log records:

Issue the following START TRACE command in an instrumentation facility interface (IFI) program:
    -START TRACE(P) CLASS(30) IFCID(126) DEST(OPX)

where:

  • P signifies to start a Db2 performance trace. Any of the Db2 trace types can be used.
  • CLASS(30) is a user-defined trace class (31 and 32 are also user-defined classes).
  • IFCID(126) activates Db2 log buffer recording.
  • DEST(OPX) starts the trace to the next available Db2 online performance (OP) buffer. The size of this OP buffer can be explicitly controlled by the BUFSIZE keyword of the START TRACE command. Valid sizes range from 256 KB to 16 MB. The number must be evenly divisible by 4.

When the START TRACE command takes effect, from that point forward until Db2 terminates, Db2 begins writing 4-KB log buffer VSAM control intervals (CIs) to the OP buffer as well as to the active log. As part of the IFI COMMAND invocation, the application specifies an ECB to be posted and a threshold to which the OP buffer is filled when the application is posted to obtain the contents of the buffer. The IFI READA request is issued to obtain OP buffer contents.End program-specific programming interface information.