Chapter 18. Troubleshooting and tracing 393
Method 1: Setting up the trace by editing the db2cli.ini file
Y ou can set up trace by editing the db2cli.ini file by completing the following steps:
1. Add a section that is similar to the section that is shown in Example 18-1 or Example 18-2 
to the db2cli.ini file, depending on your platform.
For Windows, this file is in the \sqllib path, for example, C:\Program Files\IBM\SQLLIB. 
For UNIX, this file is placed in the /sqllib/cfg path of the home directory of the instance 
owner, such as /home/archive/sqllib/cfg. For z/OS, this file is in the UNIX System 
Services /tmp file.
Example 18-1   Common section of the db2cli.ini file
[COMMON]                                                                  
TRACE=1 
TRACEREFRESHINTERVAL=5
TRACEFILENAME=/tmp/db2trace.dmp 
TRACEFLUSH=1 
TRACECOMM=1
Example 18-2   Common section of the cli.ini file for DB2 z/OS
[COMMON] 
MVSDEFAULTSSID=DB1X 
APPLTRACEFILENAME=/tmp/db2trace 
APPLTRACE=1                            
TRACETIMESTAMP=3                       
[DB1X] 
PLANNAME=DSNACLI 
For z/OS, controls also exist for the diagnostic trace:                                                                  
DIAGTRACE=1                                                                      
DIAGTRACE_BUFFER_SIZE=6291456                                                    
DIAGTRACE_NO_WRAP=1 
The full path of the TRACEFILENAME must be a valid directory with permission for everyone 
to write.
For z/OS, ensure that you refer to the following file:
//DSNAOINI DD PATH=´/usr/lpp/ars/V9R0M0/config/cli.ini 
2. Restart the application (in this case arssockd) for the changes to take effect.
3. Re-create the DB2 problem and capture the trace information.
4. To turn off the trace, modify the db2cli.ini file again and set TRACE=0.
5. Restart arssockd.