Using the 2PC Protocol | SQL Fundamentals | Teradata Vantage - 17.10 - Using the 2PC Protocol - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Fundamentals

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

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.

Performance Impact

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 the database restarts, and a session using the 2PC protocol ends up in an IN-DOUBT state, the 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 the database holds those locks.
To resolve this situation, perform the following :
  1. Use the COMMIT/ROLLBACK command to resolve manually the IN-DOUBT sessions.
  2. Use the RELEASE LOCKS command.
  3. Use the RESTART command to restart your system.

2PC causes no system overhead when it is disabled.

Related Information

For more information on 2PC, see Teradata® Director Program Reference, B035-2416.