The DBMS_XA system package defines constants that can be used to specify parameter values.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Constants used in the flag field of the XA_START and XA_END functions
The following table describes the constants used in the flag field of the XA_START and XA_END functions.
| Name | Type | Value | Description |
|---|---|---|---|
| TMNOFLAGS | PLS_INTEGER | 00000000 | Indicates that no flag is selected. |
| TMSUCCESS | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('04000000') | Indicates that the caller is separated from the transaction branch. |
| TMJOIN | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('00200000') | Indicates that the caller is joining the current transaction branch. |
| TMSUSPEND | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('02000000') | Indicates that the caller is suspended and has not ended the association. |
| TMRESUME | PLS_INTEGER | UTL_RAW.CAST_TO_BINARY_INTEGER ('08000000') | Indicates that the caller is resuming the association with the suspended transaction branch. |
Possible constant return values of DBMS_XA
The following table describes the possible constant return values of DBMS_XA.
| Name | Type | Value | Description |
|---|---|---|---|
| XA_RBBASE | PLS_INTEGER | 100 | The lower bound of the rollback codes. |
| XA_RBROLLBACK | PLS_INTEGER | XA_RBBASE | Indicates that the transaction is rolled back due to an unknown reason. |
| XA_RBCOMMFAIL | PLS_INTEGER | XA_RBBASE+1 | Indicates that the transaction is rolled back due to a communication failure. |
| XA_RBDEADLOCK | PLS_INTEGER | XA_RBBASE+2 | Indicates that a deadlock is detected. |
| XA_RBINTEGRITY | PLS_INTEGER | XA_RBBASE+3 | Indicates that the resource integrity is violated. |
| XA_RBOTHER | PLS_INTEGER | XA_RBBASE+4 | Indicates that the reason for the rollback of the resource manager (RM) is not listed. |
| XA_RBPROTO | PLS_INTEGER | XA_RBBASE+5 | Indicates that a protocol error occurs in the resource manager (RM). |
| XA_RBTIMEOUT | PLS_INTEGER | XA_RBBASE+6 | Indicates that the transaction branch takes too much time. |
| XA_RBTRANSIENT | PLS_INTEGER | XA_RBBASE+7 | Indicates that the transaction branch can be retried. |
| XA_RBEND | PLS_INTEGER | XA_RBTRANSIENT | The upper bound of the rollback codes (inclusive). |
| XA_NOMIGRATE | PLS_INTEGER | 9 | Indicates that the transaction branch may have been completed. |
| XA_HEURHAZ | PLS_INTEGER | 8 | Indicates that the transaction branch may have been completed. |
| XA_HEURCOM | PLS_INTEGER | 7 | Indicates that the transaction branch may have been committed. |
| XA_HEURRB | PLS_INTEGER | 6 | Indicates that the transaction branch may have been rolled back. |
| XA_HEURMIX | PLS_INTEGER | 5 | Indicates that some transaction branches may have been committed and others rolled back. |
| XA_RETRY | PLS_INTEGER | 4 | Indicates that the routine returns an invalid value and may be resent. |
| XA_RDONLY | PLS_INTEGER | 3 | Indicates that the transaction is read-only and has been committed. |
| XA_OK | PLS_INTEGER | 0 | Indicates that the operation is successful. |
| XAER_ASYNC | PLS_INTEGER | -2 | Indicates that the asynchronous operation is not resolved. |
| XAER_RMERR | PLS_INTEGER | -3 | Indicates that an error occurs in the transaction branch resource manager (RM). |
| XAER_NOTA | PLS_INTEGER | -4 | Indicates that the XID is invalid. |
| XAER_INVAL | PLS_INTEGER | -5 | Indicates that the specified parameter is invalid. |
| XAER_PROTO | PLS_INTEGER | -6 | Indicates that the order of the routine calls is incorrect. |
| XAER_RMFAIL | PLS_INTEGER | -7 | Indicates that the resource manager (RM) is unavailable. |
| XAER_DUPID | PLS_INTEGER | -8 | Indicates that the XID already exists. |
| XAER_OUTSIDE | PLS_INTEGER | -9 | Indicates that the resource manager (RM) performs operations other than global transactions. |
