The two-phase commit process is used to ensure data integrity in a distributed transaction. It is used for all distributed transactions that result in the commit or rollback of all changes in the transaction as a single unit.
Three phases used as :
- PREPARE: The initiating node refers to each participating node to perform commit or rollback when told to do so. It converts locks to in-doubt transaction locks on the data blocks and passes its highest SCN to the initiating node.
- COMMIT: The initiating node commits and writes to its redo log the committed SCN. The Data Block locks are released.
- FORGET: Pending transactions tables are related database views are cleared (dba_2pc_pending/dba_2pc_neighbors)