Diagnostic support in the IBM Data Server Driver for ODBC and CLI
The following tracing, logging, and diagnostic utilities are provided with the IBM Data Server Driver for ODBC and CLI product:
- CLI trace
- The method for using CLI trace with the IBM Data Server Driver for ODBC and CLI product is the same as the method for using the CLI trace with an IBM data server client product.
- Db2® trace
- To turn on the Db2 trace from the
IBM Data Server Driver for
ODBC and CLI
product installation, you must issue the db2trc command from the following directory:
- On Windows operating systems, issue the db2trc command from the bin subdirectory.
- On UNIX and Linux® operating systems, issue the db2trc command from the adm subdirectory.
For example, if you installed the IBM Data Server Driver for ODBC and CLI product at
The trace output path must have the write permission for trace files to be generated.$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 issue the db2trc command. - db2diag.log file
- When you are using the IBM Data Server Driver for ODBC and CLI product, the db2diag.log file can be found in the following location:
- On Windows operating systems: The db2diag.log file is found in the Drive:\ProgramData\IBM\Db2\%UNZIPPED PATH% directory. For example, if the IBM Data Server Driver for ODBC and CLI product was extracted to the D:\Program Files\IBM\clidriver directory, the %UNZIPPED PATH% value is D_Program Files_IBM_clidriver.
- On UNIX and Linux operating systems: The db2diag.log file
is in the
db2dump
subdirectory of the driver installation directory.
Note: On Windows operating systems, the sample configuration file is created when you run the db2cli install -setup command with the administrator authority:The DB2_DIAG system environment variable and the DIAGPATH db2cli.ini keyword can be used to alter the location of the db2diag.log file.
- db2support.zip file
-
TheDb2 command line processor is not available with the IBM Data Server Driver for ODBC and CLI product, so the CLP utility is not available. However, an executable version of the db2support command is provided in the IBM Data Server Driver for ODBC and CLI product installation.
The db2support command collects the following information:- The db2level command output.
- Environment variables.
- A listing of the contents of the IBM Data Server Driver for ODBC and CLI product installation directory.
You must issue the db2support command from the
bin
subdirectory of the installation 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 issue the db2support command.
Setting diagnostic options
db2set
command to set Db2 registry variables.
The registry variables that are related to diagnostics gathering are supported through the following
db2cli.ini keywords:
- SQL_ATTR_DIAGLEVEL
- SQL_ATTR_NOTIFYLEVEL
- SQL_ATTR_DIAGPATH
- DB2_DIAGPATH
- The DiagPath db2cli.ini keyword.
- The DB2_DIAGPATH system environment variable.
- The SQL_ATTR_DIAGPATH environment attribute.