SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Package not failing?


SSIS Package not failing?

Author
Message
david.ostrander
david.ostrander
SSC-Addicted
SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)

Group: General Forum Members
Points: 412 Visits: 692
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
Attachments
3-31-2014 3-14-33 PM.png (21 views, 128.00 KB)
Eirikur Eiriksson
Eirikur Eiriksson
SSC-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41366 Visits: 19506
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? Cool
david.ostrander
david.ostrander
SSC-Addicted
SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)

Group: General Forum Members
Points: 412 Visits: 692
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,
Eirikur Eiriksson
Eirikur Eiriksson
SSC-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41366 Visits: 19506
Do you have any event handlers configured in the package, sometimes those are overlooked?
david.ostrander
david.ostrander
SSC-Addicted
SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)SSC-Addicted (412 reputation)

Group: General Forum Members
Points: 412 Visits: 692
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.
Eirikur Eiriksson
Eirikur Eiriksson
SSC-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41366 Visits: 19506
Hard to tell what is wrong without inspecting the code, can you share it?
herladygeekedness
herladygeekedness
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1368 Visits: 813
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search