This section describes rollback (abort) processing for Teradata and ANSI session modes.
See SQL Data Manipulation Language for details about the ABORT and ROLLBACK statements.
ANSI only recognizes termination of a transaction by the performance of a COMMIT [WORK] or ABORT/ROLLBACK [WORK] request performed by the application. The system does not terminate a transaction unless it needs to preserve the integrity of the database.
If a request errs, only the current request is rolled back, and not other requests previously performed in the transaction, which means that a request in which this happens is not atomic (see “ACID Properties of Transactions” on page 647). The Lock Manager does not release locks placed for a rolled back request.
The entire transaction is rolled back when the current request is in one of the following states.
Either of the above situations is necessary before the locks held by the transaction can be released.
For a transaction, either all submitted requests are performed, or none are. Another way of stating this is to say that all transactions in Teradata session mode are atomic (see “ACID Properties of Transactions” on page 647).
If, for any reason, a transaction cannot be completed successfully, or if it times out, the entire transaction aborts and rollback processing is performed.
Rollback processing, also called abort processing, performs the following actions in Teradata session mode.
1 Rolls back all changes made to the database as a result of the transaction.
2 Releases any locks applied as a result of requests in the transaction.
3 Erases any partially accumulated results (spools).
The rollback process constitutes transaction recovery.
If the amount of work performed by a transaction is not properly controlled, the following things might occur.
An application-initiated asynchronous abort causes full transaction rollback in both ANSI and Teradata session modes. The term application in this case refers to a component of the database management system, whether client‑based or server‑based, and not to user‑written applications.
This can occur in several ways, for example, by means of a CLIv2 abort request, or by the TDP when the application terminates without proper session cleanup, or by using a Teradata tool such as SQL Assistant.