From the course: SQL Server Integration Services

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Event handlers

Event handlers - SQL Server Tutorial

From the course: SQL Server Integration Services

Start my 1-month free trial

Event handlers

- [Instructor] Previously, we've used precedence constraints, and a control flow to determine what tasks to execute based off of the success or failure of the prior task. You can also have your packages respond to a much longer list of events, beyond success or failure, by adding in event handlers. Let's take a look by first adding three script tasks into a new empty package. These scripts aren't actually going to contain any custom code, so if I run the package, they're all going to succeed, but let's hook them together with a couple of precedence constraints. Then I'll right-click on this one on the right and change it to a failure. Now if I start the package, there should be no surprises here. The first task execute without any problem, then it triggers the task over here on the left, but the one on the right doesn't trigger at all. Let's stop the debugger and go back into the design mode. Now I'm going to switch over to the Event Handlers tab here on the interface. Here, we can…

Contents