How to start DB2 Performance Trace to run CA SYSVIEW for DB2 SQL reports for static SQL statements

Document ID : KB000010768
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

When you do not like to work with IFCID 400 and 401 for static SQL collected in History file it is possible to run SQL reports if you start the DB2 Performance Trace.

Instructions:

You have to start the following DB2 performance trace.
 
-START TRACE (PERFM) CLASS(3) DEST(SMF)
 
You also have to add a CORRID or PLAN or AUTHID to the command so that you do not get trace records for every thread running on DB2, but just for the one you are interested to trace. Starting this trace can have a very high CPU overhead, especially if you do not qualify the trace with a constraint, such as CORRID or PLAN or AUTHID. For example with PLAN name the start command should be.
 
-START TRACE (PERFM) CLASS(3) DEST(SMF) PLAN(plan-name)

If the constraint is used, the overhead should be manageable. You should also remember to stop the trace as soon as you have collected the data that you need.