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

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
zwv1557098532464.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantage™

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 Topics

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