RetryOnError CLI/ODBC and IBM data server driver configuration keyword
Turns on or off the CLI driver's error recovery behavior.
- db2cli.ini keyword syntax:
- RetryOnError = 0 | 1
- IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="RetryOnError" value="0 | 1"/>
Attention: The IBM data server
driver configuration
file (db2dsdriver.cfg) syntax is available in Db2 11.5.4 and later.
- Default setting:
- Allow the CLI driver to attempt error recovery on non-fatal errors.
- Usage notes:
By default, CLI will attempt to recover from non-fatal errors, such as incorrect binding of application parameters, by retrieving additional information about the failing SQL statement and then executing the statement again. The additional information retrieved includes input parameter information from the database catalog tables. If CLI is able to recover successfully from the error, by default, it does not report the error to the application. The CLI/ODBC configuration keyword ReportRetryErrorsAsWarnings allows you to set whether error recovery warnings are returned to the application or not.
Important: Once CLI has successfully completed the error recovery, the application
may behave differently, because CLI will use the catalog information gathered during the recovery
for subsequent executions of that particular SQL statement, rather
than the information provided in the original
SQLBindParameter()
function calls. If you do not want this behavior, set
RetryOnError to 0, forcing CLI not to attempt recovery. You should, however, modify
the application to correctly bind statement parameters.