The IBM® Data
Server Driver for ODBC and CLI is
not part of the IBM Data
Server Client or
the IBM Data Server Runtime Client.
It must be installed and configured separately; and it provides a
subset of the functionality of either IBM data server client.
The following tracing, logging, and diagnostic utilities
are provided with the IBM Data
Server Driver for ODBC and CLI:
- CLI trace
- The method for using CLI trace with the IBM Data
Server Driver for ODBC and CLI is
the same as the method for using CLI trace with an IBM data server client.
- DB2® trace
- To turn on DB2 trace when
you are using the IBM Data
Server Driver for ODBC and CLI,
you must invoke the db2trc utility from the adm subdirectory
of the driver's install directory on Linux and UNIX or the bin subdirectory
for Windows.
For example, if you installed the driver at $HOME/ibm_data_server_driver_for_odbc_cli,
you must be in the $HOME/ibm_data_server_driver_for_odbc_cli/adm
directory when you invoke db2trc.
The IBM Data
Server Driver for ODBC and CLI can
be installed on a Network File System (NFS). If the driver is installed
on a read-only NFS, the environment variable DB2_DIAGPATH must be
set to allow DB2 trace to work.
- db2diag log files
-
When you are using the
IBM Data
Server Driver for ODBC and CLI,
the
db2diag log files will be located in the following
locations:
- On Windows operating
systems: The db2diag log file is located in the %SYSTEM
APP DATA PATH%\IBM\DB2\%UNZIPPED PATH%.
For example, if the CLI driver %UNZIPPED PATH% is
D:\Program Files\IBM\clidriver then the db2diag.log path
for the CLI driver will be %SYSTEM APP DATA PATH%\IBM\DB2\D_Program
Files_IBM_clidriver, where %SYSTEM APP
DATA PATH% is Drive:\Documents and
Settings\All Users\Application Data\ for Windows 2003, Windows XP and Drive:\ProgramData\ for Windows 2008 and Windows Vista.
- On UNIX and Linux operating systems: The db2diag log
file is located in the db2dump subdirectory of the
driver install directory.
The DB2_DIAG environment variable and the DIAGPATH CLI
keyword can be used to alter the location of the db2diag log
files.
- db2support
-
The DB2 command line
processor is not available with the IBM Data
Server Driver for ODBC and CLI,
so the CLP utility is not available. However, an executable version
of db2support will be available with the driver.
This
executable version of
db2support will collect the
following information:
- db2level output;
- environment variables; and
- a listing of the contents of the IBM Data
Server Driver for ODBC and CLI install
directory.
You must invoke db2support from the bin subdirectory
of the driver install directory.
For example, if you installed
the driver at $HOME/ibm_data_server_driver_for_odbc_cli,
you must be in the $HOME/ibm_data_server_driver_for_odbc_cli/bin directory
when you invoke db2support.
Setting diagnostic options
The IBM Data Server Driver for ODBC and CLI does
not support the command line processor (CLP.) This means that the
usual mechanism to set DB2 registry
variables, using the
db2set command, is not possible.
However, the functionality of registry variables related to diagnostics
is supported through CLI/ODBC keywords:
and attributes for
SQLSetEnvAttr and
SQSGetEnvAttr:
- SQL_ATTR_DIAGLEVEL
- SQL_ATTR_NOTIFYLEVEL
- SQL_ATTR_DIAGPATH
and environment variables:
The CLI/ODBC keyword DiagPath, the attribute SQL_ATTR_DIAGPATH,
and the environment variable DB2_DIAGPATH all have the same purpose:
to specify where diagnostic output is located. There is one situation,
however, where DB2_DIAGPATH must be used:
- The IBM Data
Server Driver for ODBC and CLI can
be installed on a Network File System (NFS). If the driver is installed
on a read-only NFS, the environment variable DB2_DIAGPATH must be
set to a writable directory to allow DB2 trace
to work.
Otherwise, the CLI/ODBC keyword DiagPath, the attribute
SQL_ATTR_DIAGPATH, and the environment variable DB2_DIAGPATH all
have the same effect.