SSIS Package not failing?

  • Hello -

    My SQL Server Agent shows successful completion of SSIS job but messages in Log File view shows that there was an error. How can I get the Agent to fail if there was an error or a failed to execute in the SSIS package?

    See attached pic for what I am seeing.

    Thank you,

    David

  • david.ostrander (3/31/2014)


    Hello -

    My SQL Server Agent shows successful completion of SSIS job but messages in Log File view shows that there was an error. How can I get the Agent to fail if there was an error or a failed to execute in the SSIS package?

    See attached pic for what I am seeing.

    Thank you,

    David

    As far as I can tell, there is something wrong in the logic, looks like a primary key conflict is failing the package. As any further comments would be pure speculations, can you share some more information here? 😎

  • Hi - that is correct the primary key conflict is failing the package. When the primary key conflict comes up I would like to see the job fail and the SQL Server Agent fail and send me an email as to what it is doing now by showing successful.

    In the Job Properties under Notifications I do have it set to send me an email "When the job fails". In the SSIS package it seems to get to one point fail and skips all other parts.

    Thanks,

  • Do you have any event handlers configured in the package, sometimes those are overlooked?

  • No event handlers in the package. We have some other packages that when they fail they send an email. Those were created by another admin who has left the company. I compared the packages and I know I'm missing a step somewhere.

  • Hard to tell what is wrong without inspecting the code, can you share it?

  • Check a couple properties, we have had this issue.

    For the component that should fail the job, look at

    FailPackageOnfailure (set to TRUE)

    FailParentOnFailure (set to true)

    MaximumErrorCount (set to 1)

    I learned the hard way that these properties need to be used together. If the top 2 are false and max error is > 0, failures can occur and not fail the job.

    In attempting to clone another's work, be sure to check out contraints between components and that you have all the variables they had onboard, and configs.

    I often use simple validation in an Execute SQL task and fail the job depending on what happens there, and send myself "fail mail" so I know what happened. I simply set a variable to some failure value in the component and let the constraint fail the job for me vs moving to next step.

Viewing 7 posts - 1 through 6 (of 6 total)

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