dbTalk Databases Forums  

Transactions across sub-packages

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Transactions across sub-packages in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jamie Thomson
 
Posts: n/a

Default Transactions across sub-packages - 08-19-2003 , 09:18 AM






Hello,
I need some information about transactions across multiple
packages.

Here's a hypothetical situation.

I have a package (packageA) containing 2 tasks, both
are "Execute Package" tasks. The first task executes a
package called subpackageB and the second task (which only
executes on successful completion of the first task)
executes a package called subpackageC.

I run packageA. Suppose subpackageB executes successfully
but subpackageC fails for whatever reason. I want to
rollback all of the changes made by packageA INCLUDING all
of the changes made by subpackageB. Is this possible? I
think it is but I'm getting lost in the documentation so
just though I'd come on here and ask the gurus.

Lets multiply the problem a bit. Suppose I have a package
that calls 3 sub-packages. Each of those 3 sub-packages
calls 4 further sub-packages. Hence I have a package
hierarchy with 12 packages at the leaf level. Can I
configure everything so that if the very last package at
the leaf level fails, every change made by all of the
other leaf level packages are rolled back also?

Thanks in advance for your help. I'm imagining that this
is the sort of problem everyone encounters at some point
so I'm hoping there's an easy answer.

Regards
Jamie


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Transactions across sub-packages - 08-20-2003 , 01:41 AM






OK

Here is what I did

p0 - Master package
p1 - Datapump between SQL Servers
p2 - Script task that returns failure

Function Main()
Main = DTSTaskExecResult_Failure
End Function


They all must be capable of supporting distributed transactions (SQL
Server --> Text file will fail)
p0 and p1 must use transactions in the workflow of each task and be set to
rollback on failure

Works for me





--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jamie Thomson" <jamie.thomson (AT) int21 (DOT) com> wrote

Quote:
Hello,
I need some information about transactions across multiple
packages.

Here's a hypothetical situation.

I have a package (packageA) containing 2 tasks, both
are "Execute Package" tasks. The first task executes a
package called subpackageB and the second task (which only
executes on successful completion of the first task)
executes a package called subpackageC.

I run packageA. Suppose subpackageB executes successfully
but subpackageC fails for whatever reason. I want to
rollback all of the changes made by packageA INCLUDING all
of the changes made by subpackageB. Is this possible? I
think it is but I'm getting lost in the documentation so
just though I'd come on here and ask the gurus.

Lets multiply the problem a bit. Suppose I have a package
that calls 3 sub-packages. Each of those 3 sub-packages
calls 4 further sub-packages. Hence I have a package
hierarchy with 12 packages at the leaf level. Can I
configure everything so that if the very last package at
the leaf level fails, every change made by all of the
other leaf level packages are rolled back also?

Thanks in advance for your help. I'm imagining that this
is the sort of problem everyone encounters at some point
so I'm hoping there's an easy answer.

Regards
Jamie




Reply With Quote
  #3  
Old   
Jamie Thomson
 
Posts: n/a

Default Re: Transactions across sub-packages - 08-20-2003 , 06:08 AM



Grand, thanks Allan

And my other hypothetical situation reharding a large
hierarchy of packages? Would it still roll everything back
then? I'm assuming it would cos its basically the same
problem on a larger scale - I just want to know if there's
any "gotcha's" that I haven't thought of waiting for me
when i try and do it..

Thanks again.

Regards
Jamie


Quote:
-----Original Message-----
OK

Here is what I did

p0 - Master package
p1 - Datapump between SQL Servers
p2 - Script task that returns failure

Function Main()
Main = DTSTaskExecResult_Failure
End Function


They all must be capable of supporting distributed
transactions (SQL
Server --> Text file will fail)
p0 and p1 must use transactions in the workflow of each
task and be set to
rollback on failure

Works for me





--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jamie Thomson" <jamie.thomson (AT) int21 (DOT) com> wrote in message
news:0d1201c3665c$d125b6c0$a601280a (AT) phx (DOT) gbl...
Hello,
I need some information about transactions across
multiple
packages.

Here's a hypothetical situation.

I have a package (packageA) containing 2 tasks, both
are "Execute Package" tasks. The first task executes a
package called subpackageB and the second task (which
only
executes on successful completion of the first task)
executes a package called subpackageC.

I run packageA. Suppose subpackageB executes
successfully
but subpackageC fails for whatever reason. I want to
rollback all of the changes made by packageA INCLUDING
all
of the changes made by subpackageB. Is this possible? I
think it is but I'm getting lost in the documentation so
just though I'd come on here and ask the gurus.

Lets multiply the problem a bit. Suppose I have a
package
that calls 3 sub-packages. Each of those 3 sub-packages
calls 4 further sub-packages. Hence I have a package
hierarchy with 12 packages at the leaf level. Can I
configure everything so that if the very last package at
the leaf level fails, every change made by all of the
other leaf level packages are rolled back also?

Thanks in advance for your help. I'm imagining that this
is the sort of problem everyone encounters at some point
so I'm hoping there's an easy answer.

Regards
Jamie



.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Transactions across sub-packages - 08-20-2003 , 07:17 AM



I would go along with your hypothosis. I haven't tested it but as long as
you know the rules you should be OK.

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jamie Thomson" <jamie.thomson (AT) int21 (DOT) com> wrote

Quote:
Grand, thanks Allan

And my other hypothetical situation reharding a large
hierarchy of packages? Would it still roll everything back
then? I'm assuming it would cos its basically the same
problem on a larger scale - I just want to know if there's
any "gotcha's" that I haven't thought of waiting for me
when i try and do it..

Thanks again.

Regards
Jamie


-----Original Message-----
OK

Here is what I did

p0 - Master package
p1 - Datapump between SQL Servers
p2 - Script task that returns failure

Function Main()
Main = DTSTaskExecResult_Failure
End Function


They all must be capable of supporting distributed
transactions (SQL
Server --> Text file will fail)
p0 and p1 must use transactions in the workflow of each
task and be set to
rollback on failure

Works for me





--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jamie Thomson" <jamie.thomson (AT) int21 (DOT) com> wrote in message
news:0d1201c3665c$d125b6c0$a601280a (AT) phx (DOT) gbl...
Hello,
I need some information about transactions across
multiple
packages.

Here's a hypothetical situation.

I have a package (packageA) containing 2 tasks, both
are "Execute Package" tasks. The first task executes a
package called subpackageB and the second task (which
only
executes on successful completion of the first task)
executes a package called subpackageC.

I run packageA. Suppose subpackageB executes
successfully
but subpackageC fails for whatever reason. I want to
rollback all of the changes made by packageA INCLUDING
all
of the changes made by subpackageB. Is this possible? I
think it is but I'm getting lost in the documentation so
just though I'd come on here and ask the gurus.

Lets multiply the problem a bit. Suppose I have a
package
that calls 3 sub-packages. Each of those 3 sub-packages
calls 4 further sub-packages. Hence I have a package
hierarchy with 12 packages at the leaf level. Can I
configure everything so that if the very last package at
the leaf level fails, every change made by all of the
other leaf level packages are rolled back also?

Thanks in advance for your help. I'm imagining that this
is the sort of problem everyone encounters at some point
so I'm hoping there's an easy answer.

Regards
Jamie



.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.