SSIS 2012 and 2008 Event Handlers with examples



Event handlers in SSIS 2012 or 2008 Integration Services


  1. In this article i will explain the event handlers in SSIS 2012 
  2. Event handlers are a component that execute tasks based on an event that occurs at the package, container or task level at run time. 
  3. The tasks that can be performed within an event handler are the same tasks that are available within the control flow. 
  4. The events that can be defined include:

  • OnError. This event is raised by an executable when an error occurs.
  • OnExecStatusChangedThis event is raised by an executable when its execution status changes.
  • OnInformation. This event is raised during the validation and execution of an executable to report information. This event conveys information only, no errors or warnings.
  • OnPostExecuteThis event is raised by an executable immediately after it has finished running.
  • OnPostValidateThis event is raised by an executable when its validation is finished.
  • OnPreExecute. This event is raised by an executable immediately before it runs.
  • OnPreValidate. This event is raised by an executable when its validation starts.
  • OnProgress. This event is raised by an executable when measurable progress is made by the executable.
  • OnQueryCancel. This event is raised by an executable to determine whether it should stop running.
  • OnTaskFailed. This event is raised by a task when it fails.
  • OnVariableValueChangedThis event is raised by an executable when the value of a variable changes. The event is raised by the executable on which the variable is defined.
  • OnWarning. This event is raised by an executable when a warning occurs.
Event handlers can perform the following tasks:
  • Clean up temporary data storage when a package or task finishes running.
  • Retrieve system information to assess resource availability before a package runs.
  • Refresh data in a table when a lookup in a reference table fails.
  • Send an e-mail message when an error or a warning occurs or when a task fails.
For example
An OnError event is raised when an error occurs. You can create custom event handlers for these events to extend package functionality and make packages easier to manage at run time.

0 comments:

Post a Comment