Implementing Siebel Business Applications on DB2 for z/OS > Maintaining Siebel Business Applications on DB2 for z/OS > Dynamic SQL in the Siebel Application >

About Tracing SQL Generated by the Siebel Application


The SQL that the Siebel application generates is sent to the DB2 host on the z/OS platform through ODBC and the DB2 Call Level Interface (CLI) before the SQL command is processed by DB2. To effectively troubleshoot issues, you might have to trace the relevant SQL statement through one or all of these layers. For help selecting the most appropriate tracing for the situation, create a service request (SR) on My Oracle Support.

Steps to initiate tracing are described in the following topics:

Enabling DB2 CLI Tracing

You can enable DB2 Call Level Interface (CLI) tracing by adding the following lines to the db2cli.ini file (this procedure applies to Windows and UNIX).

To enable DB2 CLI tracing

  1. Add a section to the db2cli.ini file labeled [COMMON].
  2. Add the following entries to the [COMMON] section.

    [COMMON]
    Trace=1
    TracePathName=C:\TRACE
    TraceFlush=1
    TraceComm=1

For each thread, one trace file is created in the path specified in TracePathName (ensure you have already created the path). On UNIX systems, the DB2 process owner must have the appropriate permissions to write to the directory specified in TracePathName.

Only review the trace files created at the time of problem re-creation.

Each DB2 process generates its own trace file. The events in the DB2 CLI trace are specific to DB2 clients.

About Enabling ODBC Tracing

You can enable ODBC tracing by following the instructions in 475526.1 (Article ID) on My Oracle Support. This document was formerly published as Siebel FAQ 1343. ODBC tracing produces results similar to the CLI trace, but focuses on the ODBC API calls. You cannot see the data being passed in the SQLExecute calls with the ODBC trace but you can see it in the DB2 CLI traces.

Enabling SQL Tracing for Siebel Database Utilities

You can enable SQL tracing by setting the DBUTIL_LOG_EVENTS environment variable before you run any of the Siebel database utilities, for example, the ddlimp, dataimp, ddlsync, dev2prod, or repimexp utilities.

To enable SQL tracing for Siebel database utilities

  • Set the environment variables as follows:

    set DBUTIL_LOG_EVENTS=SQLParseAndExecute=5,SQLDBUtilityLog=3

About SQL Tracing on the DB2 Host

Determine the tracing to set on the DB2 host in conjunction with the DBA. Refer to the documentation for the DB2 performance monitoring tool you use to determine how to enable the tracing.

Implementing Siebel Business Applications on DB2 for z/OS Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.