Two-Phase Commit (2PC) is an IMS and CICS protocol for committing update transactions processed by multiple systems that do not share the same locking and recovery mechanism.
Consider the following disadvantages of using the 2PC protocol:
Performance may decrease because, at the point of synchronization, up to two additional messages are exchanged between the coordinator and participant, in addition to the normal messages that update the database.
If your original SQL request took longer to complete than your other requests, the performance impact due to the 2PC overhead will be less noticeable.
If Teradata Database restarts, and a session using the 2PC protocol ends up in an IN-DOUBT state, Teradata Database holds data locks indefinitely until you resolve the IN-DOUBT session. During this time, other work could be blocked if it accesses the same data for which Teradata Database holds those locks.
To resolve this situation, perform the following steps:
- Use the COMMIT/ROLLBACK command to resolve manually the IN-DOUBT sessions.
- Use the RELEASE LOCKS command.
- Use the RESTART command to restart your system.
2PC causes no system overhead when it is disabled.
For detailed information on 2PC, see Teradata Director Program Reference.