How to email error messages?
Hi, I am very new in SSIS and just have a very basic question: how to capture whatever error message in the whole package, and send it through an email? All the postings I could find talks about how to fix a car engine or how to install LPG but no posting talks about how to start the car! Thanks!
October 25th, 2012 12:03am

check this.. http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/c472065d-30cf-4478-9d0c-91471bf62c5d --Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 12:16am

check this.. http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/c472065d-30cf-4478-9d0c-91471bf62c5d --Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
October 25th, 2012 12:19am

Thanks - but again you are telling me how to pull the engine apart without telling me how to open the lid. I would thought the most basic need of blindly sending any error message generated anywhere in the whole package to a user shouldn't need scripts to be written?
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 12:34am

Thanks - but again you are telling me how to pull the engine apart without telling me how to open the lid. I would thought the most basic need of blindly sending any error message generated anywhere in the whole package to a user shouldn't need scripts to be written?
October 25th, 2012 12:37am

Also, when a single error happens, OnError event is fired multiple times. So I don't want to put the send email task in this event handler because I don't want to send multiple emails on a single error. I also can't put the send mail task in PostExecute, because this event is fired even if there is no error. So how do I send the mail only where there is an error, and send it only once?
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 12:52am

Also, when a single error happens, OnError event is fired multiple times. So I don't want to put the send email task in this event handler because I don't want to send multiple emails on a single error. I also can't put the send mail task in PostExecute, because this event is fired even if there is no error. So how do I send the mail only where there is an error, and send it only once? so in you case, you can use custom logging and then send the all error msg in single mail.. check the above Jamie's link, here you need to modify code/tables according to your requirements... --Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
October 25th, 2012 1:20am

Also, when a single error happens, OnError event is fired multiple times. So I don't want to put the send email task in this event handler because I don't want to send multiple emails on a single error. I also can't put the send mail task in PostExecute, because this event is fired even if there is no error. So how do I send the mail only where there is an error, and send it only once? so in you case, you can use custom logging and then send the all error msg in single mail.. check the above Jamie's link, here you need to modify code/tables according to your requirements... --Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 1:24am

Thanks - but that example only talked about one thing: how to log the errors into the log table. But how to get those errors out of that log table into an email?
October 25th, 2012 2:20am

I found a posting regarding how to fetch error logs from an error log table and email it - it contains 12 steps, SQL tasks, script tasks, etc. The first part of getting the errors into the error log table requires similar amount of work. All done, I need at least 8 hours, and easily two days. With all my respects - not intending to offend - this sounds like a joke! The most basic and I'd say popular requirement - for user to get a single email containing all errors raised in a whole SSIS package, requires two days of programming! I just can't believe it. Guys. It really sounds like a joke.
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 2:35am

to get something you need to do some level of efforts... for your requirement there is no straight forward ( or 1 step solution) Option1: if you are good in SQL, create stored procedure and handle error ( insert into some temp table) and send it with database mail. Call this SP in execute SQL task. Option2: if you are good in .Net coding, write the code to catch all the error and mail it in script task only.. --Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
October 25th, 2012 3:39am

to get something you need to do some level of efforts... for your requirement there is no straight forward ( or 1 step solution) Option1: if you are good in SQL, create stored procedure and handle error ( insert into some temp table) and send it with database mail. Call this SP in execute SQL task. Option2: if you are good in .Net coding, write the code to catch all the error and mail it in script task only.. --Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 3:42am

Hi, Just a thought process in the following lines : When logging is enabled for a text file (with all the errors) logged inside the ssis package, the final log file can be mailed when it will have all the errors logged finally. Thanks , Deepak.Happy to help! Thanks. Regards and good Wishes, Deepak. http://deepaksqlmsbusinessintelligence.blogspot.com/
October 25th, 2012 4:26am

Hi, Just a thought process in the following lines : When logging is enabled for a text file (with all the errors) logged inside the ssis package, the final log file can be mailed when it will have all the errors logged finally. Thanks , Deepak.Happy to help! Thanks. Regards and good Wishes, Deepak. http://deepaksqlmsbusinessintelligence.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 4:29am

Any update? Did the idea help and route through a correct channel?Happy to help! Thanks. Regards and good Wishes, Deepak. http://deepaksqlmsbusinessintelligence.blogspot.com/
October 26th, 2012 5:35am

Any update? Did the idea help and route through a correct channel?Happy to help! Thanks. Regards and good Wishes, Deepak. http://deepaksqlmsbusinessintelligence.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2012 5:35am

Yes I decided to send my own SMTP email from the script task. Thanks!
October 27th, 2012 1:49am

Yes I decided to send my own SMTP email from the script task. Thanks!
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2012 1:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics