Sunday 19 February 2012

Confirmation on Script Task Behavior

Hello,

I am looking for some confirmation on a behavior of the SSIS Script Task. I have a custom script task that takes an input file, and archives it after it has been processed into the database.

When I run this package in the Visual Studio GUI, if the destination drive is full, it throws an exception telling me that there is not enough disk space. So, my questions are:

1) If this happens when the package is running through the command line, would this exception still be thrown? (I am thinking it will be)

2) Also, Do I need to explicitly fail the script task in the event handler, in order to ensure this .Net exception being thrown will cause the component to fail. (I am fairly certain I do, since this is what I had to do inside of the Visual Studio GUI, but does anyone know if this same behavior would occur when running from the command line?)

Thanks,

Chris

If you don't catch the exception, it should cause your script task to fail. Otherwise, you would need to explicitly fail it by setting Dts.TaskResult=Dts.Results.Failure. The exception-related behavior will be the same between the GUI and the command-line.

No comments:

Post a Comment