Craig
Craig

Reputation: 4239

Ignore errors on Execute Package task in SSIS

In an SSIS package, I have a For Loop Container task with the EvalExpression set to true (so that it runs forever). If any tasks inside the For Loop Container fail, then the package must fail -- except for the Execute Package task (that calls a child package). If that fails, then the parent package should move onto the next task.

I tried setting the MaximumErrorCount of the Execute Package task to 0, but that didn't help. I tried setting the MaximumErrorCount of the For Loop Container task to 0, but that ignores the errors of all the tasks within the For Loop Container task.

Any idea how I can ignore errors on only the Execute Package task -- within a For Loop Container.

Upvotes: 12

Views: 32342

Answers (3)

Vildan
Vildan

Reputation: 1994

  1. Go to "Event Handlers" on top
  2. On the left side choose required "Executable:"
  3. Go to "Event Handlers" on top
  4. In the middle click on "Click here to create 'OnError' event handler for executable 'xxx'
  5. Go to "Package Explorer", find newly created 'OnError' event -> Variables -> Propogate
  6. In the properties change value to "false"
  7. Done

Upvotes: 7

Andrew Uricchio
Andrew Uricchio

Reputation: 259

A better way to do this is to go to the OnError handler of your execute package task and set the System variable "Propogate" to false. This will stop the error from bubbling upwards to your loop container.

Upvotes: 13

Craig
Craig

Reputation: 4239

The answer is to use the FailPackageOnFailure property for all the tasks that should cause the package to stop and set the MaximumErrorCount of the For Loop Container task to 0.

I got the answer here: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&query=Ignore+errors+on+Execute+Package+task+in+SSIS&lang=en&cr=&guid=&sloc=en-us&dg=microsoft.public.sqlserver.dts&p=1&tid=6406db48-a2cb-4b0d-a124-4892e976a583

Upvotes: 9

Related Questions