Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Recurring errors in Loop ( SSIS ) Expand / Collapse
Author
Message
Posted Tuesday, March 5, 2013 1:51 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Saturday, March 1, 2014 5:42 AM
Points: 19, Visits: 170
I have an SSIS package where I am processing some files in a ForEach loop. In the loop I have a data flow task which does the processing. I have made sure that the loop doesn't stop even if there is bad file by setting the maxerror count of the loop to '0'. I tried to catch the error in a message box using the script task on 'ON ERROR' Event handler of the loop container. Instead of getting one error , I get three. 'Popagate' is set to false on the data flow’s OnPostExecute event. Please help.

Main package - Loop Task - Data Flow Task
Post #1426645
Posted Tuesday, March 5, 2013 3:17 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 12:13 AM
Points: 1,190, Visits: 1,664
What are the errors?
Post #1426686
Posted Tuesday, March 5, 2013 3:22 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Saturday, March 1, 2014 5:42 AM
Points: 19, Visits: 170
it's just a custom error that i am populating using the script task on the 'ONERROR' handler of the Loop. The problem is, it is getting populated 3 times.

Attached is the screenshot of the package.
& the error that I am populating is "file XYZ couldn't be processed".


  Post Attachments 
SSIS.JPG (9 views, 35.02 KB)
Post #1426688
Posted Tuesday, March 5, 2013 4:06 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 12:13 AM
Points: 1,190, Visits: 1,664
That sounds correct if you have 3 files that are failing?

Instead of using the OnError event to run a script task, can you use the failed precendence constraint on the ForEach loop container to run the script task?
Post #1426721
Posted Tuesday, March 5, 2013 4:28 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Saturday, March 1, 2014 5:42 AM
Points: 19, Visits: 170
3 errors are coming for 1 file.
I want to make sure that the loop goes on executing even if the processing of one of the files fails.
Also I want to send a mail for the corrupted file, which i am sending through the script task of the event handler.
This problem will also occur if i want to log the error messages. It will be logged thrice and not a consolidation of the same error of the same file.
Post #1426738
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse