In ANSI mode, transactions are implicitly started and explicitly closed.
A transaction initiates when one of the following happens:
- The first SQL request in a session runs
- The first request following the close of a previous transaction runs
The COMMIT or ROLLBACK/ABORT statements close a transaction.
These statements are supported on the Block File System and Object File System on the primary cluster. Although support for multistatement request is available on Object File System, they are not supported on Compute Cluster.
A transaction that includes a DDL statement (including DATABASE and SET SESSION, which are considered DDL statements in this context) must be the last statement in the transaction other than the transaction closing statement.
If an error is found in a request, that request ends. Typically, the entire transaction does not end, there are failures that end the entire transaction. Locks placed by erroneous statements are not released.
Sessions in ANSI mode do not support BEGIN TRANSACTION/END TRANSACTION statements.