Oracle7 Server Distributed Systems Volume I: Distributed Data
The Distributed Transaction Management Mechanism
Oracle7 automatically controls and monitors the commit or rollback of a distributed update transaction and maintains the integrity of the global database (the collection of databases participating in the transaction) using a transaction recovery management mechanism known as prepare/commit). This mechanism is completely transparent. Its use requires no programming on the part of the user or
application developer.
The information in this section explains how this mechanism works, why it is used, and how you can take advantage of its features to better design and configure a distributed system.
Coordinating Distributed Updates
By definition, changes made by all SQL statements in a transaction are either committed or rolled back as a unit. The commit of a non-distributed transaction (one that contains SQL statements that modify data only at a local database) is simple -- all changes are either committed or rolled back as a unit in the non-distributed system.
However, the commit or rollback of a distributed transaction must be coordinated over a network so that the participating nodes either all commit or all roll back the transaction, even if a network failure or a system failure of any number of nodes occur during the process. The prepare/commit mechanism guarantees that the nodes participating in a distributed transaction either all commit or all roll back the transaction, thus maintaining the integrity of the global database.
When Is Transaction Management Needed?
The transaction management mechanism is used only when a distributed update changes the contents of two or more databases in the distributed system, or there is a remote procedure call (RPC) that references a remote object using its global object name. When a node is read-only, Oracle7 automatically notes this, and the node need not participate in the ensuing prepare/commit phases.
All implicit database changes performed by integrity constraints, remote procedure calls, and triggers are also protected by Oracle7's distributed transaction management mechanism.