Previous Topic

Next Topic

COMMIT WORK

Description

Used to commit a transaction explicitly after executing one or more c-treeACE SQL statements. Committing a transaction makes permanent any changes made by the c-treeACE SQL statements.

Syntax

COMMIT [ WORK ] ;

Notes

  • The set of c-treeACE 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 certain circumstances, c-treeACE SQL marks a transaction for abort but does not actually roll it back. Without an explicit rollback, any subsequent updates will not take effect, since a COMMIT statement cause c-treeACE SQL to recognize the transaction as marked for abort, and instead implicitly rolls back the transaction. c-treeACE SQL marks a transaction for abort under these conditions:
    • Hardware or software system failures
    • Lock timeout errors

    SQL Compliance

    SQL-92

    Environment

    Embedded SQL and interactive

    Related Statements

    ROLLBACK WORK