The XA_PREPARE function prepares the transaction branch specified in xid for committing.
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.
Usage notes
If you need to prepare a transaction branch created by other users, you must be first granted the
FORCE ANY TRANSACTIONprivilege.An application must keep track of all the branches of a global transaction, and prepare each transaction branch. An application can only call XA_COMMIT after all the branches of a global transaction are prepared and
XA_OKis returned by XA_PREPARE for every branch.