July 21, 2008 at 6:26 pm
Hi
I have a task that sends an email to a recipient when the package fails. My problem is that it sends anywhere from 5 to 10 emails indicating that the onerror event is called more than once. Could anyone put me in the direction of a solution whereby a single email is sent. Thanks
July 28, 2008 at 5:13 am
Do a search on the interweb for SSIS event handlers and you will find all sorts of comments about how and when the events fire.
Possibly one way to get around this would be to have the OnError event handler capture the error information and store it somewhere. You could also create a boolean variable called ErrorDetected, and switch this to true in the OnError event handler.
Then, as a last task in the control flow, or even in the OnPostExecute event handler (making sure you compare the SourceName with the PackageName!), you then compile all the error info into one message and send it out.
Tom
July 28, 2008 at 5:08 pm
Thanks for the advice Tom, I'll give it a shot in the next couple of days.
May 1, 2012 at 4:43 am
I have read many post related to onError running multiple times however none of the solution is working out for me.. it is firing many an email with the same error message repeated more than 5 times.. means to say 5 times onError is recurring event.. how this can be solved
Since i already tried propogate to false, placed in Seq container, it seems somewhere i am missing.. is anybody to help me out
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy