July 31, 2012

Getting Started with the Trace Facility

The DB2 for z/OS trace facility uses something called the instrumentation facility (IF). The IF collects and records data that can be used to conduct performance tuning and analyze database performance. Here are a couple of great resources related to the IF and traces in general:

First is this presentation by IBMer Bart Steegmans, "DB2 Tracing Fundamentals: If Bart can do it, it must be easy."

This provides a nice overview of the commands associated with starting and stopping, the different types of trace records and the different ways of directing and storing the data being collected. The IF is also covered with a look at the instrumentation facility component ID (IFCID) in slide 3.

Overhead associated with monitoring is always an issue, but Bart's discussion of which traces to use and when to use them should help you drill into details without killing your system.

You'll also want to check out the "DB2 UDB for z/OS V8 Diagnosis Guide and Reference" (LY37-3201-00), which offers an excellent description of how the trace facility functions. Though it's an older publication -- and, as I explain here, not available for download -- DB2 V9 is also discussed and the information on tracing is applicable across all DB2 versions.