Tuesday, July 17, 2012

Sequence Container in SSIS

Hi,

Below is one of the best usage of sequence container in SSIS 2008.


Issue :  As you can see in above image if you have more then 1 task which gets executed on some expression set and on completion of those task if they are referring to same object (here script) then this may cause the error, the input for scrip task are coming from 2 different source, so script task will get executed only if both send mail runs successfully, which won't be true in real time scenarios.


Resolution: 


You can actually use SEQUENCE CONTAINER to resolve this issue.


Put the tasks in sequence container and use a dummy script task as seen in above image, this script actually does nothing but gives chance to put logical expression before moving to the next task.

Now, even if any of the two send mail task won't get executed based on expression set for them the sequence container will pass successful execution to next object i.e. script task as they have executed dummy script tasks available in sequence container.

And the final Script task which requires inputs from both send mail will have the inputs and will get executed successfully.


No comments: