13.2. Event Handling
Each task and container raises events as it runs, such as an OnError event, among several others that will be discussed shortly. SSIS allows you to trap and handle these events by setting up workflows that will run when particular events fire.
The first really interesting thing about Event Handlers is that there is a whole tab devoted to them in the SSIS package design environment. Figure 13-8 shows the Event Handler tab right next to the Control Flow and Data Flow tabs that you have worked with up to now. The Event Handler design area is just like the Control Flow area—you can use the same component types and do anything that is possible at the Control Flow level. Once several event handlers have been added to a package, the workflow could get very complicated and difficult to understand if you had to view it all at once, so separating Event Handlers from the Control Flow makes sense. It is important, however, to make sure your packages are well designed and documented because an Event Handler that was set up and then forgotten could be the source of a hard-to-troubleshoot problem within the package.
Figure 13.8. Figure 13-8
13.2.1. Events
As the package and each task or container executes, a dozen different events are raised. You can capture the events by adding Event Handlers that will run when the event fires. The OnError event may be the event most ...
Get Professional SQL Server™ 2005 Integration Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.