Question

I am implementing checkpoints with some special cases. My package contains a sequence container, which is having a script task and a foreach loop. Whenever package fails in foreach loop, it restarts from foreach loop but I wish to execute from the beginning of the container in case of failure.

My container looks like this: enter image description here

Any ideas how to accomplish this? EDIT: I tried setting failparentonfailure property to true, but it doesnot seem to work. If the task fails in the foreach loop, it won't run the script upon restart.

Was it helpful?

Solution

Developed a workaround by using foreach loop (that runs a single loop) instead of sequence container. Since checkpoint data is not stored for loops, it runs all the tasks inside once again.

OTHER TIPS

For all the objects within Sequence Container 1, set the FailParentOnFailure property to True.

Ran into the same problem after following a tutorial. After examining the tutorial's final files against my own manual example I discovered that the Sequence Container requires the property "TransactionOption" to be set to "Required" to get the expected results.

Googling for a solution to the unexpected behavior brought me here to this post, so though it is several years old, I decided to post my solution.

Note that Microsoft issues the following warning, excerpt below: "Defining Restart Points The task host container, which encapsulates a single task, is the smallest atomic unit of work that can be restarted. The Foreach Loop container and a transacted container are also treated as atomic units of work.

If a package is stopped while a transacted container is running, the transaction ends and any work performed by the container is rolled back. When the package is restarted, the container that failed is rerun. The completion of any child containers of transacted container is not recorded in the checkpoint file. Therefore, when the package is restarted, the transacted container and its child containers run again.

Note Using checkpoints and transactions in the same package could cause unexpected results. For example, when a package fails and restarts from a checkpoint, the package might repeat a transaction that has already been successfully committed."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top