OnError Event Handler

  • 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

  • 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

    Life: it twists and turns like a twisty turny thing

  • Thanks for the advice Tom, I'll give it a shot in the next couple of days.

  • 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