Building Packages Programmatically
Nouveau : 5 décembre 2005
If you need to create packages dynamically, or to manage and execute Integration Services packages outside the development environment, you can manipulate packages programmatically. In this approach, you have a continuous range of options:
- Load and execute an existing package without modification.
- Load an existing package, reconfigure it (for example, for a different data source), and execute it.
- Create a new package, add and configure components object by object and property by property, save it, and execute it.
You can use the Integration Services object model to write code that creates, configures, and executes packages in any managed programming language. For example, you may want to create metadata-driven packages that configure their connections or their data sources, transformations, and destinations based on the selected data source and its tables and columns.
This section describes and demonstrates how to create and configure a package programmatically line by line. At the less complex end of the range of package programming options, you can simply load and run an existing package without modification as described in Managing Packages Programmatically.
An intermediate option not described here is that of loading an existing package as a template, reconfiguring it (for example, for a different data source), and executing it. You can also use the information in this section to modify the existing objects in a package.
Remarque : |
---|
When you use an existing package as a template and modify existing columns in the data flow, you may have to remove existing columns and call the ReinitializeMetaData method of affected components. |
Dans cette section
Topic | Description |
---|---|
Describes how to create a package programmatically. |
|
Describes how to add tasks to the package. |
|
Describes how to control execution of the containers and tasks in a package based on the result of the execution of a previous task or container. |
|
Describes how to add connection managers to a package. |
|
Describes how to add and use variables during package execution. |
|
Describes how to handle package and task events. |
|
Describes how to enable logging for a package or task, and how to apply custom filters to log events. |
|
Describes how to add and configure the Data Flow task and its components. |
|
Describes how to detect the components that are installed on the local computer. |
|
Describes how to add a component to a data flow task. |
|
Describes how to connect two data flow components. |
|
Describes how to select input columns from those that are provided to a component by upstream components in the data flow. |
|
Describes how to save a package programmatically. |
Référence
Topic | Description |
---|---|
Lists the predefined Integration Services error codes with their symbolic names and descriptions. |
Sections connexes
Topic | Description |
---|---|
Discusses how to extend the control flow by using the Script task, and how to extend the data flow by using the Script component. |
|
Discusses how to create program custom tasks, data flow components, and other package objects for use in multiple packages. |
|
Discusses how to enumerate, run, and manage packages and the folders in which they are stored. |
|
Lists and describes the Integration Services programming samples available as an optional installation component. |
|
Documents the custom properties of the built-in Integration Services data flow sources, transformations, and destinations. |
Voir aussi
Concepts
Integration Services Programming
Autres ressources
SQL Server Integration Services
Centre d'informations du développeur d'Integration Services
Améliorations apportées à Integration Services en termes de développement