TMF Introduction (G06.24+)
TMF Overview
HP NonStop Transaction Management Facility (TMF) Introduction—522414-001
1-8
What Does TMF Do?
What Does TMF Do?
TMF protects transactions and performs database recovery:
•
It ensures database consistency by protecting transactions from many potential
hazards, including program failures, system component failures, and
communication failures.
•
It protects transactions from one another, thus providing database consistency
despite concurrent transactions.
•
It performs database recovery by using transaction-audit information.
Transaction Protection
Because transactions usually consist of a series of operations, processing more than
one transaction at a time can threaten database consistency and concurrency, making
transaction management complex; TMF manages this complexity.
How TMF manages transactions is best described by summarizing the properties of
transactions:
•
Each transaction is a single unit.
•
Transactions can be serialized.
•
Transactions are permanent.
Transactions that have these properties are fully protected. By ensuring these
properties, TMF provides the maximum protection for transactions and ensures
database consistency.
A TMF Transaction Is a Unit
TMF protects the transaction as a single unit, making sure that either all or none of the
changes in a transaction are applied to the database. For example, consider the
previously described money transfer transaction (Figure 1-3), which consists of two
operations on the database. If a power failure occurred just before the credit
(Operation 2) and interrupted the system, TMF would ensure that when the system
restarted, Operation 1 (the debit) would not be applied to the database.
TMF protects the database by backing out any partial transactions applied to the
database.
Application programs must designate the beginning and ending of a transaction. TMF
manages all the operations to commit or back out the transaction, as follows:
•
When a transaction ends and all the work is applied to the database, the
transaction is committed.
•
When a transaction ends but none of the work is to be applied, the transaction is
logically rolled back. In TMF terminology, this is an aborted transaction. TMF