Can I use transactions for non database related control flow tasks

  • 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)

  • 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.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply