Collecting Db2 Trace Data

This article describes RIFTC which is a trace collector.
The
RLX
/IFI program named RIFTC (Trace Collector) issues the Db2 START TRACE command and collects Db2 IFI Trace data. The following sample shows the JCL (in member RIFJMON of the CRAIJCL library) used to invoke RIFTC in batch.
//RIFJMON JOB (XXXX,1234) //* //* //* (c) Copyright Relational Architects Intl. //* Licensed material - Program property of Relational Architects //* //* Db2 Trace Collector //* The following DD names must be specified: //* //* RIFTRACE - An output Db2 Trace data segmented into records not //* to exceed a maximum LRECL of the trace data set //* RIFCNTL - Control cards used as parameters for Trace Collector //* RIFSUMM - An output for Trace Summary Report //* SYSTSPRT - An output for report options, SQLTRACE report and //* information messages //* //* Notes: //* - Verify names of the CRAILOAD and CRAIEXEC libraries //* - Allocate RIFTRACE dataset, use attributes: //* DCB=(LRECL=32700,BLKSIZE=32704,RECFM=VB) //* to match the LRECL(32700) parameter of the RIFCNTL DD name //* - Specify correct MONITOR_SSID and MONITOR_PLAN parameters //* - Review and specify desired trace options //* //* //COLLECT EXEC PGM=IRXJCL,PARM='RIFTC',REGION=4M //STEPLIB DD DSN=RAI.Rvrm.CRAILRAI,DISP=SHR // DD DSN=RAI.Rvrm.CRAILOAD,DISP=SHR // DD DSN=DSN.SDSNLOAD,DISP=SHR //SYSEXEC DD DSN=RAI.Rvrm.CRAIEXEC,DISP=SHR //RIFTRACE DD DSN=RLX.RIFTRACE,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD DUMMY //RIFCNTL DD * MONITOR_SSID(DSN) /* Db2 subsystem name to trace MONITOR_PLAN(RIFPLAN) /* Plan name used by Trace Collector TRACE(PERFM) /* PERFM, ACCTG STAT AUDIT MON CLASS(3) /* Trace SQL relative activities PLAN() /* A plan name to trace AUTHID(RAI025) /* An authorization ID to trace LOCATION() /* Location for trace command IFCID() /* One or more IFCIDs for CLASS(30,31) TDATA(COR,CPU,DIST) /* Collect Trace Standard Headers BUFSIZE(1000) /* Size of trace buffer in K-bytes COLLECT(READA) /* Type of trace collection: READA,READS ITERATE(10) /* Repeat READS or READA 5 times LRECL(32700) /* LRECL of the RIFTRACE data set DEBUG(NO) /* Activate program internal debug WTO(YES) /* Activate MVS console command process //
The job that is shown is active until 10 buffers of 1000K bytes each are filled with trace data. You can stop the collector by issuing the MVS STOP command at the console:
STOP RIFJMON
In this example,
RIFJMON
is the name of the RIFTC job.