IBM Books

Call Level Interface Guide and Reference


Enabling the Trace Using the db2cli.ini File

The db2cli.ini file is located by default in the \sqllib\ path for Intel platforms, and the /sqllib/cfg/ path for UNIX platforms. The DB2 CLI/ODBC configuration keywords used by the trace facility are:

The following lines must be added to enable the trace (the keywords are NOT case sensitive):

  1. [COMMON]
  2. Trace=1
  3. TraceFileName=(fully qualified filename)

    or

    TracePathname=(fully qualified pathname)

  4. TraceFlush=(0 or 1) - optional
  5. TraceComm=(0 or 1) - optional

For example:

   [COMMON]
   trace=1
   tracefilename=d:\temp\clitrace.txt

Setting TRACE to 0 turns tracing off. The trace file information can be left in the configuration file for the next time it is needed. See TRACE for more information.

If the application does not exit or exits abnormally, the trace file will probably not be complete. Setting TRAEFLUSH to 1 will cause a flush to disk on every function call (which will increase the overhead of tracing dramatically). See TRACEFLUSH for more information.

To have information about each network request included in the trace file, set TRACECOMM to 1. See TRACECOMM for more information.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]