Consider the following scenario. You use the SQL Native Client OLE DB provider (SQLNCLI) in SQL Server 2005 to create a linked server. You create a distributed transaction. The distributed transaction contains a query that uses the linked server to retrieve data from a table. When you commit the distributed transaction, you may receive the following error message:
Msg 1206, Level 18, State 167, Line 3
The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.
Additionally, you may receive the following error message when you run a query after this behavior occurs:
Msg 8525, Level 16, State 1, Line 1
Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
This problem occurs if the following conditions are true:
- You use the SQLNCLI provider to create a linked server between two instances of SQL Server 2005.
- The XACT_ABORT option is set to ON.
- In the distributed transaction, you try to release a rowset before all rows in the rowset are processed.
Note This problem may also occur if you call the
ReleaseRows method in a distributed transaction to release a rowset before you commit a distributed transaction in an application.