On Tue, 13 Feb 2001, David Sherrington - Enterprise Services- Data Management Systems
Engineer wrote:
> a) why the DBI connection is setting autocommit to ON? (when I beleive the
> Oracle default is OFF)
>
Not true. You are referring possibly to SQL*Plus, where the default
autocommit behavior is OFF.
The following is from the Concepts manual:
A transaction in Oracle begins when the first executable SQL statement is encountered.
An executable SQL statement is a SQL
statement that generates calls to an instance, including DML and DDL statements.
When a transaction begins, Oracle assigns the transaction to an available rollback
segment to record the rollback entries for the
new transaction.
A transaction ends when any of the following occurs:
You issue a COMMIT or ROLLBACK statement without a SAVEPOINT clause.
You execute a DDL statement such as CREATE, DROP, RENAME, ALTER. If the current
transaction contains any DML
statements, Oracle first commits the transaction, and then executes and commits
the DDL statement as a new, single
statement transaction.
** A user disconnects from Oracle. The current transaction is committed.
** A user process terminates abnormally. The current transaction is rolled back.
Regardless of the default behavior, it's a good idea to
explicitly set the autocommit behavior.
Jared