Call Level Interface Guide and Reference

Appendix K. Using the DB2 CLI/ODBC/JDBC Trace Facility

Partial Table-of-Contents

  • Enabling the Trace Using the db2cli.ini File
  • Locating the Resulting Files
  • Reading the Trace Information
  • Detailed Trace File Format
  • Example Trace File
  • Tracing Multi-Threaded or Multi-Process Applications
  • ODBC Driver Manager Tracing
  • Applications using CLI, ODBC, or SQLJ and the DB2 CLI Driver can have all the function calls traced to a plain text file. This can help with problem determination, database and application tuning or just to better understand what a third party application is doing.

    The trace can be enabled at runtime using the CLI/ODBC Settings notebook, accessible from the Client Configuration Assistant if it is available, or by editing the db2cli.ini file directly. A CLI/ODBC/JDBC application can also enable the trace by setting the SQL_ATTR_TRACE and SQL_ATTR_TRACEFILE Environment or Connection attributes. These are the same attributes used by the tracing facility in the Microsoft ODBC Driver Manager.


    [ Top of Page | Previous Page | Next Page ]