Explain Event Handlers in SSIS
What are the different types of event handlers?
OnPreValidate,OnPostValidate,OnProgress,OnPreExecute,OnPostExecute,OnError,OnWarning,OnInformation,OnQueryCancel,OnTaskFailed,OnVariableValueChanged,OnExecStatusChanged
Q130. What are the general cases that event handlers can be helpful in?
Cleanup stage tables after a bulk load completed
Send an email when a specific component failed
Load lookup tables after a task completed
Retrieve system / resource information before starting a task.
Q131. How to implement event handlers in SSIS?
Create log tables (As per the requirement) on centralized logging database
On BIDS / SSDT add event handler
Add control flow elements. Most of the times “Execute SQL Task”
Store the required information (RowCounts – Messages – Time durations – System / resource information).
We can use expressions and variables to capture this information.
Q132. What is container hierarchy in attaching event handlers?
Container hierarchy plays a vital role in implementing “Event Handlers” in SSIS. If an event handler is attached to a “Package” (a package itself it’s a container), then, the event handler applies to all associated components of that package. We need not attach the event handlers to all of them separately. But if we want to switch off the event handlers to any of the specific component in a container simply change the property “Disable Event Handlers” to “TRUE”.
Comments
Post a Comment