That is because you are asking the same connection to participate multiple
times in the same transaction. Create seperate/distinct connection objects
for each connection you want to use.
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals -
http://www.sqlpass.org [quoted text, click to view] "GayeF" <GayeF@discussions.microsoft.com> wrote in message
news:C490FB80-F29F-4569-8AB8-A10AAD3D9F0E@microsoft.com...
> Hi,
> I have a database with a number of temporary tables. The data in these
temporary tables need to be transferred into tables in the same database.
There are 5 transformations in all. I need to use transactions in the DTS
job becasue if one transform task fails then I need to rollback all inserts
to the tables. I am using Data Transform tasks because I need to use the
error handling capabilities that come with it (i.e. source, dest error
rows).
[quoted text, click to view] > The 'Join Transaction if Present' and 'rollback on failure' options are
set for each of the Transform Data Tasks and the last one has the 'commit on
success' option set. I am using 2 connections for all 5 transformation
tasks - the source connection is used for the temp tables and the dest
connection for the 'real' tables. Both connections point to the same
database. When I run the package the first transformation task executes
correctly but the second returns the following error:
[quoted text, click to view] >
> "Transaciton Context in Use By another session"
>
> Have you any Ideas on what may be the problem?
>
> Rgds
>