Enhanced Transaction Manager for SAP ASE Versions 15.0.3 or Later

In versions of SAP ASE earlier than 15.0.3, when SAP ASE implicitly aborts an external transaction without the application’s awareness, DML commands that would normally run inside this transaction might instead be executed outside the explicit transaction.

The DML commands are executed inside an implicit transaction started by SAP ASE. This behavior can result in inconsistent business data. To handle this situation, user applications should always check whether the external transaction is still active, and issue commands accordingly.

In versions 15.0.3 and later, if there is an implicit rollback of the external transaction, SAP ASE does not allow any DML commands to be executed on the connection attached to the external transaction until the transaction manager sends a detach request. The detach request indicates the end of a batch of commands intended for the external transaction.

In versions 15.0.3 and later, Adaptive Serve automatically prevents SQL commands that are intended to execute inside a distributed transaction from executing outside it. The user application no longer has to check the global variable @@trancount before every command, to see whether; when a transaction is implicitly aborted, an error message (3953) appears: “Cannot execute the command because the external transaction has been rolled back.” This message disappears when a detach transaction command is issued.

To suppress the 3953 error messages and let SAP ASE restore the former behavior (that is, executing SQL commands even when the DTM transaction is not active), start SAP ASE using trace flag -T3955.