Send Error Email with Error Code, Error Description by using Send Mail Task in SSIS Package - SQL Server Integration Services(SSIS) Tutorial

Scenario:

We have created an SSIS Package, that fails sometime. The only way to find out if the Package is failed to check SQL Server Job history or alerts generated by SQL Server Agent Job. We want to include components in SSIS Package so we can send an Email from SSIS Package with Error Information when the Package fail.


Solution:

In this video we will find out the solution for above scenario, we will learn below items in this Video
How to create SSIS Package Parameters 
How to use Event Handlers in SSIS Package for OnError Events
How to Create error in SSIS Package for Test Purpose
How to use Send Mail Task in Event Handler to send email with Error Code, Error Description etc.


Expressions used in the Send Mail Task MessageSource

" Hi Team
The Package "+ @[System::PackageName] + " has failed in "+ @[$Package::Environment]+" with below error
Error Code: "+ (DT_WSTR,50)@[System::ErrorCode]+"
Error Description: "+ @[System::ErrorDescription] +"
Error Source: "+ @[System::SourceName]+"

Please contact SSIS Team if have any questions
Thank you
Tech Brothers"



2 comments:

  1. Their staff is personable both on the phone and in-person. Everyone has a positive, can-do attitude

    ReplyDelete
  2. Their congenial, thoughtful approach to customer service informs both a Best Podcast Microphone for iPhones and their top-notch deliverables.

    ReplyDelete