Data Transformation Services

DTS Package Workflow

Data Transformation Services (DTS) steps and precedence constraints order work items in a DTS package. You can design DTS package workflow graphically, through DTS Designer, or programmatically. For more information, see Creating DTS Package Workflow and Tasks.

You also can use a Microsoft® ActiveX® script to customize step execution. For more information, see Using ActiveX Scripts in a DTS Workflow.

DTS Package Steps

Steps control the order in which tasks are executed in a DTS package. Steps represent the execution units in the DTS object model, and they define which tasks execute in what sequence when the package is run.

In DTS Designer, you do not manipulate steps directly. Instead, you manipulate tasks on the DTS Designer design sheet and use precedence constraints to control the sequence in which the tasks execute. When you place a task on the design sheet, a step is automatically added to the package, for a step references a task.

When creating a package programmatically, you can control the relationship between a step and a task more precisely. You can create multiple steps for different package operations and associate the execution of those steps with a single task. For example, suppose you write a package in Microsoft Visual Basic® and specify in several parts of the package that errors can be generated. By linking the steps associated with those errors, you can make the different types of errors execute the same Send Mail task. That Send Mail task can send an e-mail notifying the database administrator (DBA) that the package failed.

DTS Designer allows you to execute an individual package step. This action is useful for testing and troubleshooting individual steps without having to run the entire package.

To execute a single package step in DTS Designer

Enterprise Manager

Enterprise Manager

Precedence Constraints

Precedence constraints sequentially link tasks in a package. In DTS, you can use three types of precedence constraints, which can be accessed either through DTS Designer or programmatically:

The following diagram illustrates the relationship between steps and tasks in DTS Designer and shows how precedence constraints determine step execution.

Step 1, Step 2, and Step 3 indicate where the package steps occur. After the package is opened and all connections are made, the flow of execution is as follows:

Using Multiple Precedence Constraints

You can issue multiple precedence constraints on a task. For example, in the following illustration, Task C could have both an On Success constraint from Task A and an On Failure constraint from Task B. In these situations, DTS assumes a logical "And" relationship. Therefore, Task A must successfully execute and Task B must fail for Task C to begin execution.