SET AUTOCOMMIT

The SET AUTOCOMMIT command is used to turn autocommit on or off. When autocommit is on, a command is automatically committed as soon as it is successfully executed.
Restriction: This topic applies to Windows environments only.

Invocation

SET AUTOCOMMIT is an executable XDB Server utility command that can be issued interactively or embedded in a host language. SET AUTOCOMMIT can be dynamically prepared.

Authorization

No special authorization is required to set autocommit on or off.

Syntax

SET AUTOCOMMIT {ON | OFF}

Description

You can use autocommit to automatically commit a command as soon as it is successfully executed. If autocommit is on, an implicit COMMIT is issued at command completion or the close of a cursor (for SELECT statements). If Backward Logging is turned on, the autocommit feature causes the contents of the Backward Log to be cleared after each transaction. However, the release of resources such as locks and cursors occurs independently of Backward Logging.

Example:

The command to turn autocommit on is:

SET AUTOCOMMIT ON

To turn autocommit off:

SET AUTOCOMMIT OFF