Home > SSIS > SSIS Event Handling

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.

Event Description
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.

 Implementation

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.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: