Collecting SQL Activity data with a Db2 trace

To create an SQL Activity trace report, you must collect data by using a Db2 trace.

The easiest way to collect data for any OMEGAMON for Db2 Performance Expert report is to use the activate traces facility of the workstation monitor. You can use this facility to configure a Db2 trace and start and stop the trace from there. Using the activate traces facility also ensures that you include all data in the Db2 trace that is needed for a report.

Alternatively, you can start a Db2 trace as follows:

-START TRACE (P) CLASS (30) RMID (*) DEST (OPX) PLAN (PMOMDEV) AUTHID (DB2PE)
                  IFCID(6,7,8,9,11,12,13,15,16,17,18,22,28,45,53,55,58,59,60,
                        61,62,63,64,65,66,68,69,70,71,72,73,74,75,84,85,86,87,
                        88,89,92,95,96,97,105,106,107,108,109,125,157,159,160,
                        162,163,174,175,177,183,188,214,215,216,221,222,226,227,
                        231,233,237,242,272,273,305,324,325) BUFSIZE(512)

Because you need sort data, include IFCIDs 95 and 96 (Sort Start and Sort End).