OnError event does not execute

Kesha Shah 1 Reputation point
2021-08-06T14:02:10.067+00:00

Hello everyone,

I'm facing an issue with my SSIS Package as below:

I've created one package which has dataflow tasks, script tasks, execute SQL tasks, etc. I've set FailParentOnFailure and FailPackageOnFailure properties of all tasks to true and created OnError event on the package level. But when the package fails, OnError event is not capturing the failure and errors are not getting logged.

Can anyone help me out with this?

Any help will be appreciated

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2021-08-06T14:36:09.087+00:00

    Without a repo code I doubt we will be able to help. We use SSIS everywhere and our OnError logic works fine. But I'm a little concerned over your setting of the failure properties. Not sure why you'd set this on all the tasks. In general each "container" can have an error flow. The error flow is where you put your error handling. For example most people log to some external error log. All your tasks can point to the same error flow (for convenience) or do something different, depending on your needs. Seems like you should be able to put a breakpoint in your error flow task and run it in the designer to verify the error handling is working correctly.

    You should also probably consider looking at the output logs for SSIS to see how the package is flowing. This will help indicate whether it is actually calling your error flow task and your task is just not working properly.

    0 comments No comments

  2. CarrinWu-MSFT 6,891 Reputation points
    2021-08-09T08:34:17.377+00:00

    Hi @Kesha Shah ,

    Welcome to Microsoft Q&A!

    Have you select True for DelayValidation? Please refer to this thread.
    121651-true.png
    121652-delayvalidation.png

    Please refer to Add an event handler to a package to get the detail steps.

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Ryan Abbey 1,186 Reputation points
    2021-08-09T20:30:55.91+00:00

    Have you got "DisableEventHandlers" set to True? Any expression on your event handler to determine whether it should fire or not?

    Otherwise you'll have to provide more detail on your setup, what is erroring, what the logs say etc etc

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.