The DBMS_XA package defines constants that you can use as the value of parameters.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
DBMS_XA constants for the flag field in XA_START and XA_END
The following table lists the DBMS_XA constants for the flag parameter of the XA_START function and the XA_END function.
| Name | Type | Value | Description |
|---|---|---|---|
| TMNOFLAGS | PLS_INTEGER | 00000000 | This option Indicates no flag value is chosen. |
| TMSUCCESS | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('04000000') | This option dissociates a caller from a transaction branch. |
| TMJOIN | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('00200000') | This option indicates the caller is joining the existing transaction branch. |
| TMSUSPEND | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('02000000') | This option indicates the caller is suspending without ending the association. |
| TMRESUME | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('08000000') | The option indicates the caller is resuming the association with a suspended transaction branch. |
Possible constant return values for DBMS_XA
The following table describes the possible constant return values for DBMS_XA.
| Name | Type | Value | Description |
|---|---|---|---|
| XA_RBBASE | PLS_INTEGER | 100 | The lower bound of the rollback code. |
| XA_RBROLLBACK | PLS_INTEGER | XA_RBBASE | The rollback is caused by an unknown reason. |
| XA_RBCOMMFAIL | PLS_INTEGER | XA_RBBASE+1 | The rollback is caused by a communication error. |
| XA_RBDEADLOCK | PLS_INTEGER | XA_RBBASE+2 | A deadlock is found. |
| XA_RBINTEGRITY | PLS_INTEGER | XA_RBBASE+3 | A violation to the integrity of the resources is detected. |
| XA_RBOTHER | PLS_INTEGER | XA_RBBASE+4 | The resource manager (RM) rolled back a transaction without specifying the reason. |
| XA_RBPROTO | PLS_INTEGER | XA_RBBASE+5 | The RM encountered a protocol error. |
| XA_RBTIMEOUT | PLS_INTEGER | XA_RBBASE+6 | The transaction branch took too much time. |
| XA_RBTRANSIENT | PLS_INTEGER | XA_RBBASE+7 | Indicates that you can retry the transaction branch. |
| XA_RBEND | PLS_INTEGER | XA_RBTRANSIENT | The inclusive upper bound of the rollback code. |
| XA_NOMIGRATE | PLS_INTEGER | 9 | The transaction branch may already be complete. |
| XA_HEURHAZ | PLS_INTEGER | 8 | The transaction branch may already be complete. |
| XA_HEURCOM | PLS_INTEGER | 7 | The transaction branch may already be committed. |
| XA_HEURRB | PLS_INTEGER | 6 | The transaction branch may already be rolled back. |
| XA_HEURMIX | PLS_INTEGER | 5 | Some transaction branches may already be committed, and others may be rolled back. |
| XA_RETRY | PLS_INTEGER | 4 | The routine returned with no effect and may be re-issued. |
| XA_RDONLY | PLS_INTEGER | 3 | The transaction is read-only and already committed. |
| XA_OK | PLS_INTEGER | 0 | The execution is normal. |
| XAER_ASYNC | PLS_INTEGER | -2 | An outstanding asynchronous operation exists. |
| XAER_RMERR | PLS_INTEGER | -3 | The transaction branch encountered a resource manager error. |
| XAER_NOTA | PLS_INTEGER | -4 | The XID is invalid. |
| XAER_INVAL | PLS_INTEGER | -5 | One or more parameters passed are invalid. |
| XAER_PROTO | PLS_INTEGER | -6 | The routine is invoked in an improper context. |
| XAER_RMFAIL | PLS_INTEGER | -7 | The RM is unavailable. |
| XAER_DUPID | PLS_INTEGER | -8 | The XID already exists. |
| XAER_OUTSIDE | PLS_INTEGER | -9 | The RM is working outside the global transaction. |