Hi all,
does anyone know how to do event handlers in SSIS?
at the moment i've attached a send email tak to each failure from data flow tasks, but very hard to manage it.
was wondering how i can store the error message and maybe post it at the end of the project execution?
any help? please
You can use a send mail task from within a event handler and define it over there. you can define it as on failure or on task failure and whenever the task fails it will kick off the event which will in turn send the mail through the send mail task.
Thanks
|||Events bubble up by default, so just use the package event handler, or even a parent package event handler. The latter means when calling a child package through the Execute Package Task, events from the child will bubble up into the parent.
Events that have arguments, such as the OnError event expose this data through system variables, scoped to the event handler itself. So for OnError, you will see things like ErrorCode, ErrorDescription etc in the Variables Pane. Remember to click the little toolbar button to show system variables, the grey "variable" button.
To include the variable values (event argument data) in your email, use some property expressions on suitable properties like Subject and Body.
If you do not know what a Property Expression is, go look it up in Books Online, they are *very* useful.
No comments:
Post a Comment