for each loop in ssis package
Hi All,
I am using for each loop in a ssis package but the package fails if any of the iteration fails. I want the loop to complete all the iterations even in case of failure in any of the iterations.
Is it possible??? The FailpackageonFailure property is already set to false.
Please help
Vikings
May 27th, 2010 1:30am
Hi vikingss,
You have to put dummy a dummy task (probably empty script task) and connect your step which is failing as onfail predecence in your loop container.
Like
Loop
{
DataflowTask1
Onsuccess: continue doing it.
OnFail: DummyScript Task.
}
Hope that helps
Onur
BI and ERP Senior Consultant @ Nexum Bogazici
If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 1:49am
But Still I am not sure how it will not fail and continue its iteration...
In my scenarion , In the foreach loop there is only one script component. Suppose even If I add another script component How will I invoke it from the catch block of my previous script to maintain the flow.
May 27th, 2010 2:03am
by setting the Dts.TaskResult = Dts.Results.Failure
in your catch block??BI and ERP Senior Consultant @ Nexum Bogazici
If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 2:10am
Vikings,
I think your issue may be resolved by increasing the 'MaximumErrorCount' property, the default is 1. If you leave this value at 1, after the first error the package will fail. I ran into this problem while creating a SSIS package to go out
and check the availibility of all our SQL Servers across various domains after monthly patching. If I believe correctly the max you can increase the field to is 999. I also place a task in the loop to account for the failures so i can go back and look
at them later to see why they failed to connect or if they never came ack up after patching.
AndrePorter
May 27th, 2010 4:43am
The increasing maximumErrorCount is working fine,
but due to some constraint could not apply that...
is there any other way out?
The one suggested by Onur is not working in my case.~Technology Analyst~
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2011 5:30pm