THE SQL Server Blog Spot on the Web
Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

Rushabh Mehta

MS BI geek talk and the community

Gracefully Handing Task Error in SSIS Package

I am sure that there is already some blog or article about this. But, I encountered this today and decided to go ahead and blog anyway. I had a situation, where I expected at certain times (the first of every month), a task to fail, but regardless, I wanted the package to continue to run with success. One other issue, I had, was that I did not want to Error Handler of the package to kick off in case of this task failure. Also, since the task was in a Sequence Container, it was causing the Sequence Container execution results to be Failure thus invoking the "On Failure" workflow.

 

 Default behavior

This is the default behavior where the task failure for the “Drop active jobs partition” SSAS DDL task invokes the error handler at the package level (which is where I have a global error handler) and invokes a failure of its parent container. Since I know that this task is bound to fail the 1st of every month (In this scenario, I am dropping, creating and processing a monthly SSAS partition on a daily which won’t exist on the 1st of a given month), I want to gracefully “ignore” this failure and not signify a failure or write error rows in my error log tables. So, the way to handle this scenario was..

1.       Create an “On Error” Event Handler on the task “Drop active jobs partition” – You can leave the event handler blank with no tasks

On Error Event Handler

2.       To Prevent the error from going further up the chain, open up the System Variables from within the On Error error handler of the task and change the Propogate property’s value to False

Propogate Property

This should provide the desired result where the error is contained within the task

Result

Optionally, you can also choose to set the ForceExecutionResult property of this task to be Success so that it always signals a success – Even with this, you still need to follow the above steps to prevent errors from bubbling up in the package.


Published Thursday, April 24, 2008 8:46 AM by RMehta

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Ranga said:

Interesting..Thanks for the post

April 24, 2008 4:41 PM
 

Ashwani said:

Hi Rushabh,

This post helped me alot.

Thankyou

Regards,

Ashwani

July 20, 2008 10:49 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About RMehta

Rushabh is an Independent Consultant and a Business Intelligence Mentor for Solid Quality Mentors. He has been the lead architect for many large scale and complex Business Intelligence solutions for large enterprise clients such as Publix, Raymond James Financials, Jackson Hewitt, Checkers and most recently on a multi-terabyte Health Services solution for the US Department of Defense. Additionally, he has been a mentor for a large number of client such as Veterans Health Administration, Intuit, Zillow.com, Cymer, Navy Medical Center, Talbots, FM Global and Sunoco. Rushabh is also a BI trainer and has taught BI courses in countries around the world. Through his work experience, Rushabh has been instrumental in creating multiple best-practices in the implementation of the BI technologies. Rushabh also serves on the Board of The Professional Association for SQL Server (PASS) as the Director of Technology. In his current position, Rushabh is responsible for the overhaul of their technology infrastructure in order to better serve the SQL Server user community. Rushabh is also a SQL Server MVP and a frequent speaker at large conferences as well as PASS Chapters around the world.
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement