Sunday, November 25, 2012 4:53 AM
How do I fail a package based on precedence constraint.To be more clear please check the following precedence constraint setting.
Evaluation Operation : Expression and Constraint
Value : Success
Expression :@value1 == @value2
>Logical AND .All constraints must be evaluated to true.
I want the package to fail if the above expression fails.
My question is,suppose I have 2 packages(2 steps) in my job and this expression is in the first package.(Step 1)
Will this step fail and not proceed to step 2 if the above expression is not satisfied
When I run the package by itself the package does stop at the precedence constraint if the expression is not satisfied but in the output window it still shows as below.
SSIS package "ADDRESS.dtsx" finished: Success.
So just to brief , How do I give the precedence constraint settings so that if the expression fails ,the package should fail and I do not want the proceeding step in the job to execute.
All the help is appreciated...
Sunday, November 25, 2012 5:58 AM
See if this helps.
Add one more precedence constraint to Step 1.
Set it the same way as the other except the
Expression :@value1 != @value2
add a task that will definitely fail. (For Example: An execute Sql that has select 1/0) as a target task to this precedence.
This will always fail the package when your expression fails.
Hope this helps!
- Marked As Answer by Eileen ZhaoMicrosoft Contingent Staff, Moderator Friday, November 30, 2012 7:14 AM
Sunday, November 25, 2012 10:35 AM
That is exactly what I did! Thx a lot for your help..:)