Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS Package not failing? Expand / Collapse
Author
Message
Posted Monday, March 31, 2014 1:23 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 25, 2014 8:28 AM
Points: 92, Visits: 681
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


  Post Attachments 
3-31-2014 3-14-33 PM.png (5 views, 128.31 KB)
Post #1556669
Posted Monday, March 31, 2014 2:16 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 2,017, Visits: 5,499
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?
Post #1556698
Posted Monday, March 31, 2014 2:31 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 25, 2014 8:28 AM
Points: 92, Visits: 681
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,

Post #1556707
Posted Monday, March 31, 2014 2:37 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 2,017, Visits: 5,499
Do you have any event handlers configured in the package, sometimes those are overlooked?
Post #1556713
Posted Monday, March 31, 2014 3:05 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 25, 2014 8:28 AM
Points: 92, Visits: 681
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.
Post #1556730
Posted Monday, March 31, 2014 3:12 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 2,017, Visits: 5,499
Hard to tell what is wrong without inspecting the code, can you share it?
Post #1556732
Posted Tuesday, April 8, 2014 12:13 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:05 PM
Points: 287, Visits: 810
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.
Post #1559635
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse