DB2 Version 9.7 for Linux, UNIX, and Windows

AutoCommit CLI/ODBC configuration keyword

Specifies whether the application commits each statement by default.

db2cli.ini keyword syntax:
AutoCommit = 1 | 0
Default setting:
Each statement is treated as a single, complete transaction.
Equivalent connection attribute:
SQL_ATTR_AUTOCOMMIT
Usage notes:
 
To be consistent with ODBC, CLI defaults with AutoCommit on, which means each statement is treated as a single, complete transaction. This keyword can provide an alternative default, but will only be used if the application does not specify a value for SQL_ATTR_AUTOCOMMIT.
  • 1 = SQL_ATTR_AUTOCOMMIT_ON (default)
  • 0 = SQL_ATTR_AUTOCOMMIT_OFF
Note: Most ODBC applications assume the default of AutoCommit to be on. Extreme care must be used when overriding this default during runtime as the application may depend on this default to operate properly.

This keyword also allows you to specify whether autocommit should be enabled in a Distributed Unit of Work (DUOW) environment. If a connection is part of a coordinated Distributed Unit of Work, and AutoCommit is not set, the default does not apply; implicit commits arising from autocommit processing are suppressed. If AutoCommit is set to 1, and the connection is part of a coordinated Distributed Unit of Work, the implicit commits are processed. This may result in severe performance degradation, and possibly other unexpected results elsewhere in the DUOW system. However, some applications may not work at all unless this is enabled.

A thorough understanding of the transaction processing of an application is necessary, especially applications written by a third party, before applying it to a DUOW environment.