Error to variable in SSIS

I have an SSIS package that runs a data flow task. I am trying to send out and email and write to a progress log if the task succeeds or fails.

If the data flow task fails how can I insert the failure reason into the a variable for later use in an email / sql statement?

Thanks
Mike
ubya308Asked:
Who is Participating?
 
lcohanConnect With a Mentor Database AnalystCommented:
Please see SSIS logging and as far as emailing the error I believe you can use BEGIN/TRY/CATCH to see if there's some error and send an email if there is from the t-sql SSIS task. otherwise you can log it into a SQL table and put a trigger on that table to send an email if some error encountered - like an insert trigger where the message contains the error.


http://msdn.microsoft.com/en-us/library/ms138020(v=sql.105).aspx
http://stackoverflow.com/questions/5772667/how-to-create-an-error-log-or-custom-error-log-within-an-ssis-package
0
 
nishant joshiConnect With a Mentor Technology Development ConsultantCommented:
first create new global variable of package which whould be blank and create one local variable in error handlert.if error raise then on expression concate the variable strings...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.