Building Packages Programmatically
Nuevo: 5 de diciembre de 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.
[!NOTA] 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.
En esta sección
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. |
Referencia
Topic | Description |
---|---|
Lists the predefined Integration Services error codes with their symbolic names and descriptions. |
Secciones relacionadas
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. |
Vea también
Conceptos
Integration Services Programming
Otros recursos
SQL Server Integration Services
Centro de información del programador de Integration Services
Mejoras de desarrollo en Integration Services