开发者

Customizing Mail Message in SSIS Event Handler

I want to add an email notification to an SSIS 2005 package event handler. I've add开发者_JAVA百科ed a Send Mail task to the event handler. I'd like to customize the email body to include things like the error description. I've tried including @[System::ErrorDescription] in the MessageSource field, but the mail message doesn't include the value of ErrorDescription only the name of the variable.


In the dialog for the Send Mail Task, select the word Mail in the list on the right. This brings up the property page for the Mail task. Set the MessageSourceType value to Variable and set the MessageSource to the name of the variable you want to use in the format System::ErrorDescription. This is how I used this component in SQL server 2005. I believe that the steps are similar in 2008, but it has been a while since I worked at a 2008 client, so I am working from memory there.


I think you are using MessageSource property in mail tab. You need to go to expressions then in the property select MessageSource and browse for expression button, there you can drag and drop @[System::ErrorDescription] variable into Expression text area. Click on Evaluate expression it should not give any error message and you are done.


The name of the failed task is inthe system variable System::SourceName

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜