views:

689

answers:

2

If I use OnError event handler in my SSIS package, there are variables System::ErrorCode and System::ErrorDescription from which I can get the error information if any things fails while execution.

But I cant the find the same for OnTaskFailed event handler, i.e. How to get the ErrorCode and ErrorDescription from the OnTaskFailed event handler when any things fails while execution in case we want to only implement OnTaskFailed event handler for our package?

A: 

In the task that you put on the error event handler you can select parameters that are only available in an error handler such as system:Errordescription or system:Sourcename (which provideds the task that it failed on). We use these as input variables to a stored proc which inserts into an error table (and to send an email for a failed process) that stores other information beyond just the logging table. We also use the logging table to log our steps and in clude on error in that so general error information goes there.

HLGEM
thanks, as the System::ErrorDescription variable is not available for OnTaskFailed, Then whats the purpose of using OnTaksFailed i.e. What are the things which we log with OnTaskFailed event handler ?
Jason M
We don't use Ontaskfailed, so I don't know. On error seems to grab everything we need.
HLGEM
A: 

This might be helpful, it's a list of all system variables and when they are available.

http://msdn.microsoft.com/en-us/library/ms141788.aspx

CP