SSIS bits 'n' bobs BLOG
Paul Ibison
SSIS bits 'n' bobs

Fun with Precedence Constraints

I was QA-ing a colleagues packages on Friday and came across one which had a Control Flow a bit like this:



This logic looks OK at first sight - he wants a script to be executed if one of the ExecSQL tasks fails. Also, his testing had proven that it worked ok. But can you spot the flaw here?

Precedence constraints are by default combined using a logical AND. That means that both previous steps must fail in order for the script to execute. If just one fails and the other succeeds, the Show Message task won't fire. If you right-click on the failure constraint (either one) and change it to a logical OR, then the diagram will change to be like it is below and everything's hunky-dory.

So, what's all this got to do with replication?

Well - nothing really give or take the odd URL!

But the last 12 months I've been exclusively working on SSIS so I'd like to finally write up some of the things we've learned in my team.

Some of it is obvious looking back but wasn't clear to us at the time. Some other points don't seem to be covered elsewhere, or at least are not clear in existing articles. I may or may not get something posted this weekend, but either way please keep an eye out over the next few weeks because I already have about 7 topics in mind.