How do I Continue After a Failure in SSIS
To answer the question as I asked it, it is possible to continue after failures by making sure that MaximumErrorCount is zero for the task and its parent containers... In this case that means the "Test Connection" task, the "foreach" container and the package itself.
I ended up doing something different though. And Jamie Thomson's Verify A Connection Before Using It was helpful here. Here's what I did:
I replaced the Test Connection task with a script task. The script task was almost exactly like Jamie's script except that I
- only used one connection manager, not all of them,
- the task result was always success
- and I set a new variable "User::ConnectionSucceeded" to the result of the connection test.
I also changed the arrows coming out of the test connection task to evaluate expressions, they evaluate:
- @[User::ConnectionSucceed] == True
- @[User::ConnectionSucceed] == False
respectively.
I also had to remember to edit the multiple constraints going into the "Update LastMonitored" task. I changed them to use a logical "OR".
Here's what my SSIS package looks like now: