Autocommit


In the context of data management, autocommit is a mode of operation of a database connection. Each individual database interaction submitted through the database connection in autocommit mode will be executed in its own transaction that is implicitly committed. A SQL statement executed in autocommit mode cannot be rolled back.
Autocommit mode, in theory, incurs per-statement transaction overhead, having often undesirable performance or resource utilization impact. Nonetheless, in systems such as Microsoft SQL Server, as well as connection technologies such as ODBC and Microsoft OLE DB, autocommit mode is the default for all statements that change data, in order to ensure that individual statements will conform to the ACID properties of transactions.
The alternative to autocommit mode means that the SQL client application itself is responsible for issuing transaction initiation and termination commands. Non-autocommit mode enables grouping of multiple data manipulation SQL commands into a single atomic transaction.
Most DBMS force autocommit for every DDL statement, even in non-autocommit mode. In this case, before each DDL statement, previous DML statements in transaction are autocommitted. Each DDL statement is executed in its own new autocommit transaction.