db2dumpSQLCodes IBM data server driver configuration keyword

Specifies whether diagnostic logs are gathered when specified SQLCODEs are encountered in a connection to the Db2® for z/OS® server.
Equivalent CLI keyword
Not available.
Equivalent IBM® data server provider for .NET connection string keyword
IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="db2dumpSQLCodes" value="'DEFAULT' | 'OFF' | Absolute SQLCODE1 value, Absolute SQLCODE2 value, ..."/>
Default setting:
The default value is 'OFF'.
Usage notes:
You can enable a mechanism to capture diagnostic information on the first occurrence of an SQL error event in the connection to the Db2 for z/OS server with the db2dumpSQLCodes keyword. When you set the db2dumpSQLCodes keyword to a 'DEFAULT' or list of SQLCODEs, the following diagnostic information is written to a log file on the occurrence of a specified SQLCODE event.
  • Sysplex configuration information
  • Sysplex member statistics
  • Sysplex group statistics
  • Connection details that include the connection state and the process state
  • Client information properties that are explicitly set1
  • Code page information that is related to the connection.
  • Monitoring information like Application ID, Handle, and External Name (EXTNAM) of server.
  • SQL statement, Attributes, package information (If error occurs while SQL is running).
  • Application binding information (If any).
  • Result-set and Parameter description (If any).
  • XA information (If it is an XA connection).
  • SSL information (if the connection is SSL).
  • Application type and phase of the SQL execution that developed the error.
Two rotating diagnostic log files that are 1 MB are generated per each application process. The name of the diagnostic log file consists of the db2dumpdata_<pid>.<index>.log format. The <pid> value in the log file name represents the process ID of the application and the <index> value represents a value that is equal or greater than 0. Once the log file reaches the size of 1 MB, log file with the smallest index value is deleted, and new log file is created.

The diagnostic log files are placed in the clientrecords subdirectory under the diagnostic data directory path (diagpath).

You must ensure that the diagnostic log files in the clientrecords subdirectory are deleted regularly to free up disk space on your system.

The db2dumpSQLCodes keyword setting can also be set dynamically without restarting the application when CfgRefreshInterval keyword is set to any valid value.

A special value that is equivalent to setting the following absolute SQLCODE values.
  • 30108 for the SQL30108N error
  • 20542 for the SQL20542N error
  • 1224 for the SQL1224N error
No diagnostic information is logged.
Absolute SQLCODE values
Absolute SQLCODE values that are separated by comma. Only the absolute SQLCODE values can be specified. The following sample IBM data server driver configuration file entry lists SQL30108N and SQL20542N for the db2dumpSQLCodes keyword.
<parameter name=”db2dumpSQLCodes” value=”30108,20542"/>
1 The default values of configuration parameters are not logged.