Transaction handling

The Firebird architecture allows high transaction concurrency. Transaction save points (nested transactions) are also supported. All Firebird transactions are ACID compliant. ACID is explained below:

There are several parameters available to configure transactions in order to ensure consistency within the database. These parameters invoke the concept of concurrency. To ensure data integrity, there are four configurable parameters affecting concurrency: isolation level; lock resolution mode; access mode; and table reservation.

In isql, a transaction is begun as soon as the utility is started. The transaction is begun in SNAPSHOT isolation, with a lock resolution set to WAIT. Since the Firebird isql utility accepts DDL, DML and other commands, transactions are handled accordingly, in the following ways:

Users can specify the access mode and level of isolation for the next transaction, and explicitly commit the current transaction by using the SET TRANSACTION statement. SET TRANSACTION can be executed only when there is no other transaction being processed. It does not by itself initiate a transaction. Here is the syntax:

SQL> SET TRANSACTION;

In Firebird 2.0 the SET TRANSACTION statement has been enhanced to support all Transaction Parameter Buffer (TPB) options. These include:

Example

SET TRANSACTION WAIT SNAPSHOT NO AUTO UNDONE LOCK TIMEOUT 10;

Note: If you request help on the SET in isql then the SET TRANSACTION command is not shown.