Sql-server – Question regarding flow control of SQL based jobs in SSIS

sql serverssis

Question: I have pertaining to SQL and SSIS :

How do I make an SSIS package work according to a logical flow that I mapped out for it?

Say there are six steps, I have the logic for how they should all run.

So for example, if A fails, do b, regardless of failure of b, do C, etc. But it is becoming a huge pain in the back trying to implement this in SSIS.

The conventional precedence constraints are too simple and 'linear' for this sort of thing. So, I thought maybe I could create a separate table that stores the values of 'flags' that I will set to 1 or 0 and these flags will correspond to the outcome of each step.

I will keep two sets of 6 values in a table, one for last run of my package and one for current run, then make comparisons to ensure consistency of data across multiple tables in multiple runs (accounting for any failure of any step this way) but I have no clue how to implement this right now.

Best Answer

This actually is pretty easy to do within SSIS. Taking your situation, I have 3 dataflows named A, B and C.

A B C Dataflows

You can change whether it is on Success, Failure or Completion by right clicking on the lines and setting that value

Right Click

I believe this gets you what you are looking for, at least for the scenario you have presented here.