Showing posts with label tasks. Show all posts
Showing posts with label tasks. Show all posts

Wednesday, March 7, 2012

Continue package execution on task failure

Hi,

I am developing an SSIS package and need the execution of the package to continue even if one of the tasks within the package fails. I have an OnError event handler for this task which fires when it fails but want the rest of the package to continue.

Any suggestions greatly appreciated.

Thanks

Hi PK2000

Can you tell me on what kind of package it fails on and what the next package is that you want to execute?

Kind Regards,

Joos Nieuwoudt

|||

Hi Joos,

I probably didn't explain the problem clearly......

I have one SSIS package with multiple tasks. I want the the package to continue even if the first task within the package fails.

Thanks

|||Hi

by default the arrows between your tasks on the control flow (precedence constraints) are green. It means that you require the task to be successful in order for the next task to be launched.

You can change this behaviour by double-clicking on the green arrow to change the constraint value from 'Success' (green) to 'Completion' (blue) - the next task will then be executed on both failure or success.

cheers

Thibaut|||

Hi PK2000,

Sorry, I understood your question wrong but Thibaut's answer is correct. Try it.

Kind Regards,

Joos Nieuwoudt.

continue option in for loop

I have a for loop I have several tasks inside. I would like to "continue" with a new iteration if any of the tasks in the loop error or fail. Is this possible and if so -- how?

How about this:

Odd... the image shows up in the editor, but not in the message itself. Here is the URL: http://manowar.kicks-ass.org/images/matthew/blog/forloop-continue.jpg

This is basically a variation on the "script task as control flow placeholder" theme discussed here: http://bi-polar23.blogspot.com/2007/05/conditional-task-execution.html

Disclaimer: I have not fully tested this, but it should work. If not, it should give you a good starting point.

|||Thank you. I'll give this a try and send you a reply|||In doing testing, it appears that if a task within a for loop task fails, it immediately attempts to jump to the for loop container as its parent thereby acting as a 'continue' behavior. One item to note is that if continued looping is necessary in the event of a task failure, the MaxErrorCount value needs to be set to a value greater than 1. Otherwise the loop will fail altogether on the first child task failure.

Friday, February 24, 2012

Container content edit wierdness

I attempted to move some tasks into a new sequence container. It failed saying element cannot be found in a collection. Now I find that visually the tasks do not appear in the container. But in some ways they are. I can not try to move the tasks to the container, or I get the same "element can not be found". If I execute the container, the tasks outside the container run.

I thought to CUT and PASTE my tasks, but then it says "The package contains one or more event handlers for this task. Deleting the task will also delete the event handlers and the event handler context."Good luck with this one. I hope others have found a solution, or perhaps SP2 fixes it. Which version of SSIS are you using? I have the same problem and fight with that all of the time.

(Sorry, I know that's not what you wanted to hear.)|||

Closing and reopening BIDS usually fixes it for me!!

-Jamie

|||Opening and closing BIDS did not help me.

I took a chance, and ignored the cut/paste failure. I am back in business now.|||Yet another problem is SP2 update fails for me. Hoping this might fix it, but I was forced to look for a work around instead.

Thanks for sharing your experience.