DB2 Trace Destination
When a trace is started, DB2 formats records containing the requested information. After the information is prepared, it must be externalized. DB2 traces can be externalized to six destinations:
- GTF GTF (Generalized Trace Facility) is a component of MVS and is used for storing large volumes of trace data.
- RES RES is a wraparound table residing in memory.
- SMF SMF (System Management Facility) is a source of data collection used by MVS to accumulate information and measurements. This destination is the most common for DB2 traces.
- SRV SRV is a routine used primarily by IBM support personnel for servicing DB2.
- OPn OPn (where n is a value from 1 to 8 ) is an output buffer area used by the Instrumentation Facility Interface (IFI).
- OPX OPX is a generic output buffer. When used as a destination, OPX signals DB2 to assign the next available OPn buffer (where X is a number between 1 and 8 ).
The Instrumentation Facility Interface (IFI), which is a DB2 trace interface, enables DB2 programs to read, write, and create DB2 trace records and issue DB2 commands. Many online DB2 performance monitors are based on the IFI.
A synopsis of the available and recommended destinations for each DB2 trace type is provided in the following table. Y indicates that the specified trace destination is valid for the given type of trace; N indicates that it is not.
| Type of Trace | GTF | RES | SMF | SRV | OPn | OPX | Recommended Destination |
|---|---|---|---|---|---|---|---|
| Statistics | Y | N | Default | Y | Y | Y | SMF |
| Accounting | Y | N | Default | Y | Y | Y | SMF |
| Audit | Y | N | Default | Y | Y | Y | SMF |
| Performance | Y | N | Default | Y | Y | Y | GTF |
| Monitor | Y | N | Default | Y | Y | D | OPn |
| Global | Y | Default | Y | Y | Y | Y | SRV |

