Transactions in For Each Loop
Hi
I have a For Each Loop that iterates over the nodes in an XML document. The For Each Loop contains a Sequence Container that wraps all the actual processing elements (data flows and Tasks). I need to set up the Loop so that even if a row fails processing, either in the Tasks or Data Flow, it is skipped andprocessing continues to the next row.
I have set the Transaction Option to Required on the Sequence Container. This at least ensures that all the rows processed till the point the failure occurs are not being rolled back. But the package fails after the first row in error.
Can anyone tell me how to get this done. I am relatively new to SSIS and ETL in general.
Thanks in advance
Vikas
September 8th, 2008 6:31am
have you tried increasing the value of the MaximumErrorCount property?
hth
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2008 8:11am
Hi Duane
Thanks for replying.
What value should MaximumErrorCount be set to? The problem is that there can potentially be any number of records in the source and any number of records in error.
Is there any other way such as configuring the Transaction Scope property settings or some other properties?
Thanks in advance
Vikas
September 10th, 2008 12:32pm
Vikas Manghani wrote:
Hi Duane
Thanks for replying.
What value should MaximumErrorCount be set to? The problem is that there can potentially be any number of records in the source and any number of records in error.
ok. then you need to figure out how you want to handle the errors. data flow error rows can be redirected to a tableor raw file. task errors can be trapped with an OnError event handler.
Is there any other way such as configuring the Transaction Scope property settings or some other properties?
i'm not sure. sorry.
Free Windows Admin Tool Kit Click here and download it now
September 12th, 2008 8:44am
I am not clear about your issue.
But, to my understanding you need the for loop to continue even if it has a failure inside.
You need to find the reason for the failure and handle them.
For eg: if the failure is in DF you have to either ignore the error or divert the error rows to a different destination.
Thanks.Tiffosi!
January 18th, 2011 5:25pm