• TomThomson (8/29/2014)


    rbartram-847800 (8/28/2014)


    I have a similar issue.. I want all my steps in a job to go to the next step even if the step fails but I want it to send an email saying that step failed and it went to the next step. I don't believe you can do that natively in SQL server so how can we without adding try/Catch to each step?

    It's simple; after each step insert an extra step, except after the last original step add two new steps. Configure each original step to invoke the following step if it fails and to the next but one step if it doesn't. Each new step except the last one sends an email and goes to the next step. The last new step does nothing, just exits.

    This probably isn't the right way to address this problem, but it will work.

    We actually just had this presented as a problem from one of our developers. The solution was to have each step continue to the next on failure, and then have the last step call a procedure that goes to job history table and sends an email with the failed job steps. Pretty simple actually. In our case, they development teams use their own email engine, so they just enter some information into a queue that will send an email out for them. Else, you could use the ap_send_db_mail to sent an html email with the information.

    Jared
    CE - Microsoft