SQL Reference Guide
Used to commit a transaction explicitly after executing one or more FairCom DB SQL statements. Committing a transaction makes permanent any changes made by the FairCom DB SQL statements.
COMMIT [ WORK ] ;
- The set of FairCom DB SQL statements executed prior to executing COMMIT WORK statement are executed as one atomic transaction that is recoverable, serializable and durable.
- On a system failure and/or the execution of the ROLLBACK WORK, the transaction is marked for abortion and the database is rolled back to its initial state.
- A commit operation makes any database modifications made by that transaction permanent.
- Once a commit operation is executed the database modifications cannot be rolled back.
- Once a commit operation is executed the transaction modifications are guaranteed to be durable irrespective of any transient system failures.
- The atomicity applies only to the database modification and not to any direct I/O performed to devices such as the terminal, printer and OS files by the application code.
- A commit operation releases any locks implicitly or explicitly acquired by the transaction on the database.
- Under the following exceptional circumstances a commit or a commit to a savepoint may fail causing all changes to be rolled back:
- Lock timeout errors
- Hardware errors
- Software errors
- Storage space failures
Embedded SQL and interactive