Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Send errors into a SQL table

Author  Topic 

theboyholty
Posting Yak Master

226 Posts

Posted - 2013-03-22 : 06:51:36
I've built a package in SSIS 2008 that uses a ForEachLoop container to import over 1000 spreadsheets. I'm getting occasional errors though and what I want to do is for each iteration that fails, send various pieces of information into an error table. Of course the most important piece of information should be the error message - 'why did this component fail?'. Then the idea is that when it has run I can see a simple list of the spreadsheets that failed, and the reason.

Does anyone know how to retrieve this information from an individual SSIS component?

---------------------------------------------------------------------------------
http://www.mannyroadend.co.uk A Bury FC supporters website and forum

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-03-22 : 07:02:22
you can add a logic on the on error event of for each loop. Add a execute sql task inside to dump the error detail to your table.
Also make sure you set FailPackageOnFailure and FailParentOnFailure properties to False for for each loop. Also set a high value for MaximumErrorCount

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -