Friday, March 23, 2012

How to enable or disable a task programmatically using Script Task

I have made one package which extracts data from the source does transformation and submits the data to destination. Subsequently it also updates the required control files.

Now I want to add a functionality :

If the package is executed again it should check the status of previous execution in control file if success mark all tasks disable and stop

if failure mark all tasks at enable and start extracting data and continue further with execution.

I was able to attain similar functionality in SQL Server 2000 using activeX script. What code do I need to write as a part of Script Task in order to attain above functionality.

Jatin,

In DTS you would disable the task but that is not how you do things in SSIS. Instead you can use conditional precedence constraints to decide whether to execute a particular task or not. There's a good demo of this here: http://www.sqlis.com/default.aspx?306

-Jamie

|||

Jamie,

Thank you for explaining the same with an example.

Jatin

sql

No comments:

Post a Comment