PREPARE TO COMMIT
Valid in: ESQL, OpenAPI, ODBC, JDBC, .NET
The PREPARE TO COMMIT statement polls the local DBMS server to determine the commit status of the local transaction associated with the specified distributed transaction. The distributed transaction is identified by its distributed transaction ID, a unique, 8-byte integer that is generated by the coordinator application.
This statement provides support for the two-phase commit functionality. For a discussion of two phase commit, see the chapter “Working with Transactions and Handling Errors.”
Dynamic SQL cannot be used to execute this statement. This statement must be terminated according to the rules of your host language.
Note: The only SQL statements that can follow the PREPARE TO COMMIT statement are COMMIT or ROLLBACK.