Default language.

Stop the trace before thread completion


If you do not want to capture events through to the completion of a thread, no accounting record can be captured, and the following considerations apply:

  • A trace without logging will never show an incomplete thread.
  • Events for each SQL statement are written after it is completed and the start/end event matching is done. If the trace is stopped before a long-running SQL statement finishes, the data for that SQL statement will be lost.
  • Stop the trace when you have collected sufficient data on the logs. You can stop the trace manually, or by specifying a stop time when making the trace request. Because no accounting record is received at thread completion, the trace entry in LTRAC will still show INCMP. (Partially filled online buffers are not written when the trace is stopped before a thread is completed.)

No log switch is required before stopping the trace.

  • If a log fills up, the detail entries on that log are still available through the INCMP LTRAC entry for each log used, whether one or many. If the thread is traced to completion, the accounting data is available on the last log. Online, you view the data one log at a time. However, the trace print facility can process the data from all the logs of a trace in one report. The events are still shown under their controlling LTRAC entries for each log, but will appear in chronological sequence.
  • Specify OVERWRITE LOGS as YES or NO depending on whether you want to preserve the earliest or latest events captured.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Monitor for Db2 13.1