Note that there are some explanatory texts on larger screens.

plurals
  1. POI want SSIS to trap an error, branch and then exit with success
    primarykey
    data
    text
    <p>I have googled around and think I have tried just about every suggestion I've seen but I can't seem to get this to work the way I want to. I'm CONVINCED that SSIS can do this.</p> <p>I have an SSIS package that has 4 tasks, they execute in order: task A, then B, then C. The 4th task D I am using as an end-point if B fails... more on that in a minute.</p> <p>Task A does some unrelated work. I'm including it because there's processing at the start of the package and should any of it fail, then I want the package to fail - just the SSIS default, exit the package with a return code of 1 if task A fails.</p> <p>B is a DFT with a flat-file source, it transfers data to be processed in step C. B is the crux of my question because I want to deal with errors in task B differently than the rest. It's not uncommon for the flat-file source to not exist or to be corrupt and I want to capture/trap that but not cause the entire package to fail. If B does have an error though, I do NOT want to process task C.</p> <p>C processes the data I transferred in DFT B when B does not have an error.</p> <p>I am trapping errors in DFT-B with an "OnError" eventhandler that executes a SQL task that sends an email. I then use an "on completion" precidence constraint to divert the control flow to an endpoint - task D. (D does nothing, it's just a dummy end-point that I'm using partially for debugging, partially to give the event handler somewhere to "go" - I am not certain D is even required).</p> <p>Anyway, when I run the package and trigger an error in B my package performs the event handler (sends the email just fine), it even continues on to task "D", and in the debugger, "D" ends with success (shows green). The problem is, my package fails with an exit code of "1".</p> <p>I've tried messing with all sorts of things... ForceExecutionValue/ ForceExecutionResult/ MaximumErrorcount. Now I have a package that actually doesn't even contiune to my "task D" and I'm not sure how I got there (but the exception handler SQL is faithfully sending me an email!).</p> <p>I do not want that exit code of 1! I want a 0!</p> <p>help! thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload