| Previous | Next |
| XACT_E_WRONGSTATE | XACT_E_XTIONEXISTS |
XACT_E_WRONGUOW
The branch being completed is not the branch the resource expects
XACT_E_WRONGUOW means a unit-of-work identifier supplied to the resource manager does not match the transaction branch associated with the current enlistment or local state. This protects one transaction from accidentally completing, recovering, or modifying another transaction’s durable work.
Correlate the distributed transaction ID, resource-manager branch ID, and local transaction handle at every boundary. Pooling bugs can return a connection still associated with an older unit of work, and recovery code can load the wrong prepared record after identifier truncation or encoding changes. Do not substitute the currently ambient transaction ID; restore the exact identifier persisted with the branch or roll back through the resource manager’s supported recovery procedure.
Identifiers to compare byte for byte
- Global transaction or unit-of-work identifier.
- Resource-manager branch and enlistment identifiers.
- Local database, queue, or journal transaction handle.
- Serialized recovery record before and after transport or storage.
References
- Microsoft MS-DTCO: unique transaction identifiers
- Microsoft: reenlisting a specific prepared transaction
- The Open Group: global and branch transaction identifiers
Looking for a different code? Search another status or error code.