O'Reilly logo

Professional SQL Server™ 2005 Integration Services by Mike Murphy, Haidong Ji, Jason Gerard, Erik Veerman, Andy Leonard, Kathi Kellenberger, Douglas Hinson, Darren Green, Allan Mitchell, Brian Knight

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required