The Execute Package task extends the enterprise capabilities of Data Transformation Services (DTS) by letting you run other DTS packages as part of a workflow. This capability is useful when:
You can use the Execute Package task to dynamically assign the values of global variables from a parent package to a child package. The child can process the global variable data passed to it in any Microsoft® ActiveX® script in its executable workflow.
Using global variables to pass information from one package to another is useful when parts of a larger workflow are assigned to different packages. For example, one package could download data on a nightly basis, summarize the data, assign summary data values to global variables, and pass the values to another package for further processing of the data.
Global variable values passed to the child package are handled according to their scope definitions described in the child package. Global variables defined as static in the child package retain their last assigned values, and global variables not defined as static return to their initial values after the script runs.
Joining Execute Package tasks to package transactions lets you join the execution of entire packages and other workflow steps into units of work that can be committed or rolled back. Before joining an Execute Package task to a transaction, consider the following:
The transactional context within which an Execute Package task runs can range from the execution context of the entire master package to specific parts of the workflow, and to the Execute Package task itself, if the task is not joined to any transactions.
When joining the Execute Package task to a transaction in DTS Designer, use:
Caution Creating workflows or ActiveX scripts in which an Execute Package task is used to call its own package can generate a stack overflow and cause Microsoft Management Console (MMC) to shut down. Generally, recursive operations are not recommended with the Execute Package task. If you need to use the Execute Package task recursively, make sure you set a global variable in an ActiveX script to monitor the nesting depth (for example, in a step ActiveX script or in an ActiveX Script task that determines precedence), and terminate the recursion in the script code before a specified depth is reached. The global variable must be passed to the subpackage through its GlobalVariable collection.
To add a DTS task to a DTS package