Dumping a Db2 trace file

After the trace facility has been enabled using the ON option, all subsequent work done by the instance will be traced.

While the trace is running, you can use the clr option to clear out the trace buffer. All existing information in the trace buffer will be removed.

C:\>db2trc clr
Trace has been cleared

Once the operation being traced has finished, use the dmp option followed by a trace file name to dump the memory buffer to disk. For example:

C:\>db2trc dmp trace.dmp
Trace has been dumped to file

The trace facility will continue to run after dumping the trace buffer to disk. To turn tracing off, use the OFF option:

C:\>db2trc off
Trace is turned off