Db2 traces requirements
Db2 Query Monitor requires that you use several Db2 accounting and statistics traces to record Db2 subsystem data and events for use in problem determination.
Accounting traces
Accounting traces record Db2 subsystem data and events relating to application programs. Accounting traces capture information about start and stop times, the number of commits and aborts that take place, the number of times an SQL statement is used, the number of buffer pool requests, the counts of certain lock events, the processor resources that are consumed, thread wait times, RID pool processing, distributed processing, and resource limit facility statistics.
These classes enable you to define the type of accounting information that your system collects:
- Accounting class 1
- (Default) Shows the time an application has spent since it connected to Db2, including the time spent outside Db2. Accounting class 1 is not required to be activated.
- Accounting class 3
- Shows the elapsed time in terms of various waits such as the duration of suspensions due to waits for locks and latches or waits for I/O. Accounting class 3 must be activated to collect delay-related data statistics.
Statistics traces
Information collected using statistics traces enables you to conduct Db2 capacity planning and to tune Db2 programs. These traces record information about the amount of Db2 system services and database services that are used. Db2 Query Monitor uses these Db2 statistics classes:
- Statistics class 1
- (Default) Provides information about system services and database statistics.
- Statistics class 3
- Provides information about deadlocks and time-outs.
- Statistics class 4
- Provides information about exceptional conditions.
Activating statistics and accounting classes
Define the following classes in the DSN6SYSP macro of DSNZPARM to activate the appropriate accounting and statistics classes:- SMFACCT=(1,3),
- SMFSTAT=(1,3,4),