Collecting Diagnostic Information


The following list details instructions on how to gather diagnostic information needed by IBM Customer Support.

1 Operating System Information

For AIX
  #!/usr/bin/ksh   #   # Get AIX system information   # USAGE:  getos.sh 0   #   today=`date +"%Y%m%d_%H%M%S"`   typeset dbpartnum=${1-0}   typeset outfs=${2-/db2wkarea/${dbpartnum}/output}   mkdir -p ${outfs}   lscfg > ${outfs}/lscfg_${today}.txt   no -a > ${outfs}/no_${today}.txt   df -k > ${outfs}/df_k_${today}.txt   lsfs > ${outfs}/lsfs_${today}.txt   cat /etc/services > ${outfs}/services_${today}.txt   cat /etc/host > ${outfs}/hosts_${today}.txt   exit  
For Solaris
  #!/bin/ksh   #   # Get Sun Solaris information   # Usage: getOS.sh   #   today=`date +"%Y%m%d_%H%M%S"`   /bin/showrev > ${outdir}/showrev_${today}.txt   /etc/sysdef -i > ${outdir}/sysdef_${today}.txt   /bin/dmesg > ${outdir}/dmesg_${today}.txt   df -k > ${outdir}/df_${today}.txt   /usr/platform/`uname -m`/sbin/prtdiag > ${outdir}/prtdiag_${today}.txt   cat /var/adm/messages > ${outdir}/messages_${today}.txt   cat /etc/vfstab > ${outdir}/vfstab_${today}.txt   cat /etc/passwd > ${outdir}/passwd_${today}.txt   cat /etc/group > ${outdir}/group_${today}.txt   cat /etc/system > ${outdir}/system_${today}.txt   cat /etc/services > ${outdir}/services_${today}.txt   exit  

2 DB2 Information

[View full width]
 
[View full width]
#!/usr/bin/ksh -x # # USAGE: getdb.sh dbname dbpartnum instname # today=`date +"%Y%m%d_%H%M%S"` typeset dbname=${1-sample} typeset dbpartnum=${2-0} typeset instname=${3-db2inst1} typeset outfs=${4-/tmp/${dbpartnum}/${instname}} mkdir -p ${outfs} db2level > ${outfs}/dblevel_${today}.txt db2 get dbm cfg > ${outfs}/dbmcfg_${today}.txt db2set -all > ${outfs}/dbreg_${today}.txt db2 list node directory > ${outfs}/dbnode_${today}.txt db2 list db directory > ${outfs}/dbdir_${today}.txt db2 get db cfg for ${dbname} > ${outfs}/${dbname}_dbcfg_${today}.txt db2look -d ${dbname} -a -x -l -f -e -p\ > ${outfs}/${dbname}_${today}.ddl db2 connect to ${dbname} db2 "select * from syscat.bufferpools"\ > ${outfs}/${dbname}_buff_${today}.txt db2 "list tablespaces show detail"\ > ${outfs}/${dbname}_ts_${today}.txt for tsid in `awk '
  #!/usr/bin/ksh -x   #   # USAGE: getdb.sh dbname dbpartnum instname   #   today=`date +"%Y%m%d_%H%M%S"`   typeset dbname=${1-sample}   typeset dbpartnum=${2-0}   typeset instname=${3-db2inst1}   typeset outfs=${4-/tmp/${dbpartnum}/${instname}}   mkdir -p ${outfs}   db2level > ${outfs}/dblevel_${today}.txt   db2 get dbm cfg > ${outfs}/dbmcfg_${today}.txt   db2set -all > ${outfs}/dbreg_${today}.txt   db2 list node directory > ${outfs}/dbnode_${today}.txt   db2 list db directory > ${outfs}/dbdir_${today}.txt   db2 get db cfg for ${dbname} > ${outfs}/${dbname}_dbcfg_${today}.txt   db2look -d ${dbname} -a -x -l -f -e -p\ > ${outfs}/${dbname}_${today}.ddl   db2 connect to ${dbname}   db2 "select * from syscat .bufferpools"\ > ${outfs}/${dbname}_buff_${today}.txt   db2 "list tablespaces show detail"\ > ${outfs}/${dbname}_ts_${today}.txt   for tsid in `awk '$0 ~ /Tablespace ID/ {print $4}' ${outfs}/${dbname}_ts_${today}.txt`   do   db2 "list tablespace containers for $tsid show detail"\ >> ${outfs}/${dbname graphics/ccc.gif }_container_${today}.txt   done   db2 terminate   exit  
~ /Tablespace ID/ {print }' ${outfs}/${dbname}_ts_${today}.txt`
do db2 "list tablespace containers for $tsid show detail"\ >> ${outfs}/${dbname graphics/ccc.gif }_container_${today}.txt done db2 terminate exit

3 Copy of the db2diag.log, Any trap and dump Files
4. Details of the Errors

Describe the origin and symptoms of the problem. Explain how the error can be recreated by supplying applicable code fragment of the program, SQL, and stored procedures. If possible, describe the difference in results between executing the stored procedure or SQL in the command line and executing from within an application. Indicate whether the problem is an abend (abnormal termination), suspension, looping, or slow response time.

5 DB2 Trace

DB2 Customer Support may request a trace if the information you already sent is not enough to diagnose a problem. When it is being collected, the information is recorded in chronological order.

The following is a step-by-step instruction on how to run a db2 trace. Tracing to memory is the preferred method of tracing. However, if the server-client DB2 crashes before the trace is dumped into a file, tracing to a file has to be used.

  1. Log in as db2inst1.

  2. Start DB2 UDB trace; enter:

      db2trc  on  l 8000000  
  3. Recreate the problem.

  4. Dump the trace output:

      db2trc   dump   nov19trc.dmp  
  5. Stop DB2 UDB trace; enter:

      db2trc   off  
  6. Format DB2 UDB trace output; enter:

      db2trc   fmt   nov19trc.dmp   nov19trc.txt   db2trc   flw   nov19trc.dmp   nov19trc.flw  
  7. View DB2 UDB trace output file; enter:

      pg  nov19trc.txt  

6 DB2 DRDA Trace

DB2 Customer Support may request a DRDA trace if the information you already sent is not enough to diagnose a problem. The db2drdat command traces DRDA dataflow exchanged between DRDA Application Requesters and DRDA Application Servers.

  1. Turn on DRDA trace.

      db2drdat  on  i  r  s  c  
  2. Recreate the problem.

  3. Turn off DRDA trace; enter:

      db2drdat  off  
  4. View DRDA trace file; enter:

      pg  db2drdat.dmp  

7 DB2 CLI Trace

DB2 Customer Support may request a CLI trace. This file can be found in the ../sqllib/cfg directory.

  1. Take a backup of the CLI trace file; enter:

      cp  db2cli.ini  db2cli.bak  
  2. Add trace parameters:

      [COMMON]   Trace=1   TracePathName=C:\TRACE\cli   TraceFlush=1   TraceComm=1   jdbctrace=1   jdbctraceflush=1   jdbctracepathname=c:\trace\jcbc  

where TracePathName must be an existing directory. Do not specify a file, only a path .



Advanced DBA Certification Guide and Reference for DB2 UDB v8 for Linux, Unix and Windows
Advanced DBA Certification Guide and Reference for DB2 Universal Database v8 for Linux, UNIX, and Windows
ISBN: 0130463884
EAN: 2147483647
Year: 2003
Pages: 121

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net