Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Send Mail Task - Message

Author  Topic 

notes4we
Yak Posting Veteran

90 Posts

Posted - 2008-10-08 : 09:15:25
Hello Friends,

I have a SSIS package having different tasks.
At the end of all the tasks I have a Send Mail Task, which is set on Error.
It means, if the package fails, then it should send an email to the mentioned email id.

My question is that is there any way that I could include the exact error message in the text?
I mean suppose the package has error in Step 2.
So, there will be an error message: The package failed because .....................

I wanted to know if this error message: The package failed because....................can be included in the body of the email that it will be sending.
If there is any system variable that can do that, or if we can create any user variable.

Please do let me know in detail, if you have any answer for this.
Thank you.

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2008-10-08 : 09:55:14
One solution - If you have logging enabled you can attach the entire file with you email.
Go to Top of Page

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2008-10-08 : 09:59:25
Another solution - use Script Task and save error into a variable then attach to email body.

http://agilebi.com/cs/blogs/jwelch/archive/2007/05/05/handling-multiple-errors-in-ssis.aspx
Go to Top of Page

notes4we
Yak Posting Veteran

90 Posts

Posted - 2008-10-08 : 11:33:13
Thanks for your replies.
I used the logging method. It is working fine.
Go to Top of Page

notes4we
Yak Posting Veteran

90 Posts

Posted - 2008-10-08 : 12:12:02
The attached log file is coming through fine, but still it does not show the exact error message. It just shows where the package was run, start time, end time,......

I would appreciate if you could help me with this.
Go to Top of Page
   

- Advertisement -