The XA_PREPARE function prepares the transaction branch specified in xid for committing.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
DBMS_XA.XA_PREPARE (
xid IN DBMS_XA_XID)
RETURN PLS_INTEGER;
Parameters
| Parameter | Description |
|---|---|
| xid | For more information, see DBMS_XA_XID object type. |
Return values
For more information, see Possible constant return values for DBMS_XA.
The possible return values are XA_OK, XA_RDONLY, XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, and XAER_PROTO.
Considerations
An application must track all branches of a global transaction and prepare each transaction branch. Only when all branches of the global transaction are prepared and XA_PREPARE returns XA_OK can the application proceed to call XA_COMMIT.