DB2 Version 9.7 for Linux, UNIX, and Windows

TraceErrImmediate CLI/ODBC configuration keyword

Specifies whether diagnostic records are written to the CLI/ODBC trace when records are generated.

db2cli.ini keyword syntax:
TraceErrImmediate = 0 | 1
Default setting:
Diagnostic records are only written to the trace file when SQLGetDiagField() or SQLGetDiagRec() is called; or "Unretrieved Error Message" is written to the trace file for handles which had diagnostic records that were left unretreived.
Only applicable when:
the CLI/ODBC Trace option is turned on.
Usage notes:
 

Setting TraceErrImmediate=1 helps in determining when errors occur during application execution by writing diagnostic records to the CLI/ODBC trace file at the time the records are generated. This is especially useful for applications that do not retrieve diagnostic information using SQLGetDiagField() and SQLGetDiagRec(), because the diagnostic records that were generated on a handle will be lost if they are not retrieved or written to the trace file before the next function is called on the handle.

If TraceErrImmediate=0 (the default setting), then diagnostic records will only be written to the trace file if an application calls SQLGetDiagField() or SQLGetDiagRec() to retrieve diagnostic information. If the application does not retrieve diagnostic information through function calls and this keyword is set to 0, then the "Unretrieved Error Message" entry will be written to the trace file if a diagnostic record exists, when a function is next called on the handle.

This option is only used when the Trace CLI/ODBC option is turned on.

(This option is contained in the Common section of the initialization file and therefore applies to all connections to DB2®.)