16.20 - The Two-phase Commit Process - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

prodname
Teradata Tools and Utilities
vrm_release
16.20
created_date
September 2019
category
Programming Reference
featnum
B035-2417-108K

In a successful database update in a Two-phase commit session, there are several critical events that take place in the following order:

  1. The application reads or updates (or both) the participant databases.
  2. After all database accesses in the logical unit of work have completed successfully, the application directs the coordinator to commit the updates.
  3. The coordinator sends a prepare to commit request to all participants.
  4. If the participant can commit the work, it externalizes its journal entries, retains any write locks obtained in the logical unit of work, and responds affirmatively to the coordinator‘s prepare to commit request.
  5. The coordinator collects all the responses to the prepare to commit request and, if all are affirmative, enters the commit phase and sends commit requests to all participants.
  6. The participants irrevocably commit the updates and release the write locks.
  7. The participants respond to the coordinator’s commit request with a confirmation that the commit has been successfully completed.
  8. The application receives control at the statement following its commit request from step 2, above.