Reputation: 1405
SSIS event handlers are very useful. Event handlers can be added at the level of the package itself, or for any executable in the package. This, along with the Propagate property, is very useful to allow certain operations to deal with errors in their own way. For example, a loop can react to an error by recording that "This row with key [whatever] had a problem", carry on with the rest of the rows, and not trigger the package's Error handler, which is saved for more fatal, general errors (e.g. a server goes down).
The number of places there can be an event handler is also a curse. In Visual Studio, the Event Handlers tab is where you can see, add or change event handlers. It's great if I want to add an event handler to task ExecuteSomeSQL, or sequence container DoSomeThings - or to find the event handlers for these executables which I already know are there.
But it's not suited to quickly finding out which executables in the package actually have any event handler. To do that, I have to click through the executables tree onto every executable, and see whether each one has anything under Event Handlers.
An alternative view would make this much easier. Either:
Am I missing something, is there actually already a good way to see this?
Upvotes: 1
Views: 955
Reputation: 61221
The Package Explorer is what you're looking for. It's the last tab for a non-running package.
Every level has "Executables" and an "Event Handlers" section. As you expand either one, you'll see what's listed there.
My sample is a Foreach Loop with a Data Flow Task inside it. The Data Flow has OnError event handler with a sequence container, and an OnPostExecute with an sequence container with a script task inside there. Fortunately, you can't add an event handler on an event handler (you might have been able to in earlier versions).
Otherwise, I think you're looking at writing custom code to crawl your package.
Upvotes: 2