Error handling at package level in SSIS

There are many causes of errors and failures when a package is running, either in Debug Mode or in Production. One of the best and simplest ways to manage error handling is with the Event Handler tab in the SSIS Visual Studio design environment. Under the Event Handler drop-down list, you can see all of the event types that can be triggered to fire off a notification, email, or insert the error details into a file, or a database table.

From this tab, you can choose from any (or all) of the components within your whole package to contain an event handler. Although each component can have its own custom event handler, generally the most common error handling method is to put the error handling at the highest level, the package, so that all of the errors float up and can be processed from one centralized location.










In every other respect, you create Event Handlers just like any package—with Control Flows and Data Flows. In Figure 2-110, we have added an Expression Task to populate a variable with Error Codes and Error Descriptions, which are then inserted into an ErrorLog table in a database table. Interestingly enough, the components within the Event Handler can have Event Handlers of their own to catch any problems with the error handling—for example maybe the database connection being used for the event handler is no longer available.

Comments

Popular Posts

Install Master Data Services (MDS)

Non-blocking, semi-blocking, and blocking transforms in SSIS

Design an appropriate storage solution, including hardware, disk, and file layout