Implications for system administrators

Detached transactions are meant to persist in Adaptive Server, since the client application may want to reattach the original thread, or attach a new thread to the transaction. The System Administrator can no longer roll back a transaction by killing its associated spid, as a thread is not attached to the transaction.

Transactions in a detached state may also prevent the log from being truncated with the dump transaction command. In extreme circumstances, detached transactions can be rolled back by using the new dbcc complete_xact command to heuristically complete a transaction. See “Heuristically completing transactions”.


dtm detach timeout period parameter

The system administrator can also specify a server-wide interval after which Adaptive Server automatically rolls back transactions that are in the detached state. dtm detach timeout period sets the amount of time, in minutes, that a distributed transaction branch can remain in the detached state. After this time has passed, Adaptive Server rolls back the detached transaction.

For example, to automatically rollback detached after 30 minutes, use the command:

sp_configure 'dtm detach timeout period', 30