Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Can I use transactions for non database related control flow tasks Expand / Collapse
Author
Message
Posted Wednesday, February 20, 2013 9:54 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, November 17, 2014 2:27 AM
Points: 418, Visits: 652
Guys,

I have a package that has two tasks. The first is an SQL task which updates two tables (batch headers and batch lines) with some details of an extract file (filename, status etc..)
The second is a DataFlow task that takes these records and generates the file oleSource to flatfileDestination

The testers asked me what happens if the file fails to write (lets say that for some reason the target path is not available; folder is wrongly named or remote server is off-line)

I have wrapped the two tasks in a Sequence container and set TransactionOption to Required. [The package doesn't run because MSDTC is not active on the server but that is a separate issue. ]

Will this work within a transaction or do I need a different approach (the alternative is to write additional steps to undo the update if the dataflow task fails, but this takes more work for something which will should never happen)
Post #1422165
Posted Thursday, February 21, 2013 9:14 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 9:19 AM
Points: 22, Visits: 739
That's the right way to begin, I think. Setting the TransactionOption to Required on the container will cause the container to start a transaction. Now you should set TransactionOption to Supported on the tasks within the container, so they will participate in the container's transaction.
Post #1422665
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse