SSIS event handlers are the simplest means of turning an SSIS script into a reliable system that is auditable, reacts appropriately to error conditions, reports progress, and allows instrumentation and monitoring of your SSIS packages.
OnError
event is raised when an error occurs.Event handlers can perform tasks such as the following:
Creating an event handler is similar to building a package; an event handler has tasks and containers, sequenced into a control flow, and an event handler can also include data flows. The SSIS Designer includes the Event Handlers tab for creating custom event handlers.
You can also create event handlers programmatically.
The following table lists the event handlers that Integration Services provides and describes the run-time events that cause the event handler to run.
Event handler | Event |
---|---|
OnError | The event handler for the OnError event. This event is raised by an executable when an error occurs. |
OnExecStatusChanged | The event handler for the OnExecStatusChanged event. This event is raised by an executable when its execution status changes. |
OnInformation | The event handler for the OnInformation event. This event is raised during the validation and execution of an executable to report information. This event conveys information only, with no errors or warnings. |
OnPostExecute | The event handler for the OnPostExecute event. This event is raised by an executable immediately after it has finished running. |
OnPostValidate | The event handler for the OnPostValidate event. This event is raised by an executable when its validation is finished. |
OnPreExecute | The event handler for the OnPreExecute event. This event is raised by an executable immediately before it runs. |
OnPreValidate | The event handler for the OnPreValidate event. This event is raised by an executable when its validation starts. |
OnProgress | The event handler for the OnProgress event. This event is raised by an executable when measurable progress is made by the executable. |
OnQueryCancel | The event handler for the OnQueryCancel event. This event is raised by an executable to determine whether it should stop running. |
OnTaskFailed | The event handler for the OnTaskFailed event. This event is raised by a task when it fails. |
OnVariableValueChanged | The event handler for the OnVariableValueChanged event. This event is raised by an executable when the value of the variable changes. The event is raised by the executable on which the variable is defined. This event is not raised if you set the RaiseChangeEvent property for the variable to False . |
OnWarning | The event handler for the OnWarning event. This event is raised by an executable when a warning occurs. |
At run time, containers and tasks raise events. You can create custom event handlers that respond to these events by running a workflow when the event is raised.
You create event handlers by using the design surface of the Event Handlers tab in SSIS Designer.