Distributed transaction error only through code

I will try to execute the query on the linked server (SQL Server 2008 associated with Sybase) and select it in the temp table. Works fine, although the query window is in SQL Management Studio, but when I do this using code (C #), it fails with the error "The operation could not be completed because the OLE DB provider" ASEOLEDB "for the linked server" MYLINKEDSERVER " Could not start the distributed transaction. I do not use the transaction in the code with my DbConnection.

This query is as follows:

SELECT * INTO #temptable FROM OPENQUERY([MYLINKEDSERVER], 'SELECT * from table') 
+1
c # transactions linked-server
Nov 17 '10 at 14:39
source share
1 answer

Problem detected. This was the result of combining compounds. It seems that the connections are being reused, causing the system to think that a distributed transaction is occurring.

+1
Nov 21 2018-10-21T00:
source share




All Articles