Roll up all SSIS errors to single email

  • Hello,

    I have a very simple pkg that truncates a table and pumps fresh data into the table nightly. I have been able to capture the errors in an event handler and send them in an SMTP (Send Mail) task. The problem is that for a single error I get 4 emails, all different error messages. How can I capture all the errors and put them into a single email? I'm rather new to this so a step by step example would be great.

    Thank you,

    Bill

  • I found this blog which I adapted to suit my needs.

    http://agilebi.com/jwelch/2007/05/05/handling-multiple-errors-in-ssis/

    Good luck..

  • wcwarner (9/16/2010)


    Hello,

    I have a very simple pkg that truncates a table and pumps fresh data into the table nightly. I have been able to capture the errors in an event handler and send them in an SMTP (Send Mail) task. The problem is that for a single error I get 4 emails, all different error messages. How can I capture all the errors and put them into a single email? I'm rather new to this so a step by step example would be great.

    Thank you,

    Bill

    I haven't checked the link above, but what I do is contatenate all the error messages together into one variable that I use for the body of the error email.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • wcwarner (9/16/2010)


    Hello,

    I have a very simple pkg that truncates a table and pumps fresh data into the table nightly. I have been able to capture the errors in an event handler and send them in an SMTP (Send Mail) task. The problem is that for a single error I get 4 emails, all different error messages. How can I capture all the errors and put them into a single email? I'm rather new to this so a step by step example would be great.

    Thank you,

    Bill

    This is very normal as for every error the package encounters it will call the associated event handler, if defined any. A better approach would be to create a collection of all errors encountered while package execution and then use the Send Mail Task.

    Raunak J

  • I suggest, to enable logging in package then collect log in text file.

    and send that file as attachment through mail.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply