BUG: Error 3910, “Transaction Context in Use by Another Session”
Symptoms
Transferring data from one table to another in the same database with a Data Transformation Services (DTS) package with the Join Transaction If Present option enabled in the Workflow Properties generates error 3910:
Transaction context in use by another session.
Resolution
This problem is caused when both of the following occurs:DTS enlists the package in a Distributed Transaction Coordinator (DTC) transaction.
-and-The first “SELECT * FROM <source_table> statement is not stopped when the enlist operation is triggered.
NOTE: The package automatically performs this SELECT query on both the source and destination tables.Thus, the enlisting transaction is affected by a new system process ID (SPID).
When this occurs, there are two different SPIDs in a single DTC transaction, and both connections/SPIDs are connected to the same server.In SQL Server, it is not permitted for two connections in the same transaction to execute a query against the same SQL instance concurrently.
If the number of rows returned by the first SELECT is small enough to fit within a single network packet (4096 bytes by default), SQL Server can send the entire resultset immediately and does not need to wait for the client (DTS) to fetch any rows. Because the whole resultset was sent in a single packet, SQL can clean up and release all resources associated with the query before any queries are attempted on the second connection. It is therefore by design and fully expected that the error does not occur when the rowcount is small.
In SQL Server 7.0, the error is:
Transform data task: undefinedTransaction context in use by an other sessionIn SQL Server Profiler you will see: Exception, Severity=25, Event Subclass=67, IntegerData=3617In SQL Server 2000, the error is:
An exception occurred when handling the control request.Connection ‘MySecondConnection’ for Task DTSDataPump does not support joining distributed transactions or failed when attempting to join. New transactions cannot enlist in the specified transaction coordinator.In SQL Server Profiler you will see: Exception State=2, Severity=16, Error=3910, Integer Data: <empty>

Leave a Reply