SSIS Error - Transaction context in use by another
All
I'm developing a package in SSIS reading data from two databases on a SQL 2000 server and moving the data (with some transformation) to a SQL 2005 server. I am executing the package on the 2005 box.
The package must employ transactions and having configured MSDTC on both servers I still seem to get the error "Transaction context in use by another session" when setting the TransactionOption value to required for the control. When executing, the package starts validation phases, the transaction is started in DTC (on all the relevant servers) but fails when the scenario below is encountered.
I do the following inside a Data-Flow-Task:
Create and OLE DB Source connection that points to a connection manager configured against databaseA on the SQL 2000 server. The following SQL example applies:
Select col1, col2...coln
from databaseA.dbo.table1
Create and OLE DB Source connection that points to a connection manager configured against databaseB on the SQL 2000 server. The following SQL example applies:
Select col1, col2...coln
from databaseA.dbo.table1
Both of the OLE DB Source outputs are directed through a Union Transformation (since the structure of databaseA and databaseB are identical - only the data in each database is different).
The output of the union is directed to a Multicast Transformation. The multicast directs it's output to two separate OLE DB destinations.
Destination1 - SQL Server 2000 table is populated with multicast output stream 1.
Destination2 - SQL Server 2005 table is populated with multicast output stream 2.
Both of the destinations above have their own connection managers.
When I execute the data-flow-task I get a clutch of errors as follows. If I simply set the TransactionOption to 'NotSupported' or 'Supported' instead of 'Required', this task executes successfully. Also, if I split the task into two separate data-flow tasks (ie: select from databaseA and write Destination1 in one data flow and select from databaseB and write to Destination2 in another data flow - the package will succeed).
I have done many searches on MSDN/Technet/Google etc. to find a solution here. The bottom line is, I need to employ a transaction in this package and haven't been ab;e to get it working despite haviung broken the package down to bare bones and creating a dummy environment
Error: 0xC0202009 at Insert Unprocessed Keys From DatabaseA & DatabaseB, Write Keys - SQL_DEST_2000 [104]: An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E14 Description: "Transaction context in use by another session.".
Error: 0xC0202009 at Insert Unprocessed Keys From DatabaseA & DatabaseB, Write Keys - SQL_DEST_2000 [104]: An OLE DB error has occurred. Error code: 0x80040E37.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E37 Description: "Transaction context in use by another session.".
Error: 0xC004701A at Insert Unprocessed Keys From DatabaseA & DatabaseB, DTS.Pipeline: component "Write Keys - SOURCE" (104) failed the pre-execute phase and returned error code 0xC0202040.
Thanks in advance
David
|