Wednesday, March 25, 2009

SSIS Ignoring Failed processes

When coding I find myself putting in checks to catch edge case scenarios. Unfortunately SSIS isn’t as easy to do this based on the component style of the application, and often you need to run processes that aren’t based on condition. A perfect example of this is mounting and unmounting NFS shares to Linux systems. Using Windows Mount/UMount you can easily mount a drive letter to a Linux share, but checking existence is a different case. WMI queries blows up when trying to get at this information (at least in my case).

A simplified synopsis of the package I’m designing is to mount a NFS share, Import Data, Unmount Share. If in the first step the share already exists the package blows up. However I don’t care if it fails I just want to continue on to the next step, since the share is already mounted. The easy solution is for the flow to use a criteria of completion, rather then success. Simple solution until you put it into a SQL Job. Here even though the package flows through successfully, the SQL Server Agent still notes the failed step, and fails the package. The work around is in the process tasks to set the FailTaskIFReturnCodeisnotsuccessValue property to false. Doing so gives the Process Task a success on execution completion.

No comments: