SSIS Event Handling
Events are used to alert users or administrators of any application. A complete application should have proper event handling mechanism.
SSIS has this feature to raise an event with user defined message to give more meaningful information about the operation.
|FireCustomEvent||Raises a user-defined custom event in the package.|
|FireError||Informs the package of an error condition.|
|FireInformation||Provides information to the user.|
|FireProgress||Informs the package of the progress of the task.|
|FireQueryCancel||Returns a value that indicates whether the package needs the task to shut down prematurely.|
|FireWarning||Informs the package that the task is in a state that warrants user notification, but is not an error condition.|
Step 1: Create a package and add Script Task.
Step 2: Add the below script inside Script Task
Dts.Events.FireError(0, "SQLServerRider", "This is a custom log entry thrown by a script task", "", 0)
Step 3: Execute package
Step 3: Now, go to Progress tab. You can see the highlighted message in the log information.
Thanks for reading.