Heuristically Completing Transactions

SAP ASE includes the dbcc complete_xact command to facilitate heuristic completion of transactions.

dbcc complete_xact resolves a transaction by either committing or rolling back its work, freeing whatever resources the transaction was using. The command is provided for those cases where only the system administrator can properly resolve a prepared transaction, or for when the system administrator must resolve a transaction without waiting for the transaction’s coordinator.

For example, in , heuristic completion may be considered if all remote SAP ASEs have prepared their transactions, but the network connection to ASE1 was permanently lost. The remote SAP ASEs will maintain their transactions in a prepared state until contacted by the coordination service from ASE1. In this case, only the system administrator for ASE2, ASE3, and ASE4 can properly resolve the prepared transactions. Heuristically completing the prepared transaction in ASE3 frees up transaction and lock resources, and records the commit status in systransactions for later use by the transaction coordinator. Heuristically completing the transaction in ASE2 also completes the transaction propagated to ASE4.

Related concepts
Transactions Coordinated by SAP ASE or X/Open XA During Crash Recovery