Create Package Configurations
Applies To: SQL Server 2016
You create package configurations by using the Package Configuration Organizer dialog box and the Package Configuration Wizard. To access these tools, click Package Configurations on the SSIS menu in SQL Server Data Tools (SSDT).
In the Package Configuration Organizer dialog box, you can enable packages to use configurations, add and delete configurations, and set the preferred order in which configurations should be loaded.
From the Package Configuration Organizer dialog box, you run the Package Configuration Wizard, which guides you through the steps to create a configuration. To run the Package Configuration Wizard, add a new configuration in the Package Configurations Organizer dialog box or edit an existing one. On the wizard pages, you choose the configuration type, select whether you want to access the configuration directly or use environment variables, and select the properties to save in the configuration.
The following example shows the target properties of a variable and a package as they appear on the Completing the Wizard page of the Package Configuration Wizard.:
\Package\My SQL Task.Variables[User::varTableName].Properties[Value]
In this example, the configuration updates these properties:
The RaiseChangedEvent property of user-defined variable,
The MaximumErrorCount, LoggingMode, and LocaleID properties of the package.
The Value property of user-defined variable,
varTableName, within scope of the task, My SQL Task.
The "\Package" represents the root, and periods (.) separate the objects that define the path to the property that the configuration updates. The names of variables and properties are enclosed in brackets. The term Package is always used in configuration, regardless of the package name; however, all other objects in the path use their user-defined names.
After the wizard finishes, the new configuration is added to the configuration list in the Package Configuration Organizer dialog box.
The following table describes the columns in the configuration list in the Package Configuration Organizer dialog box.
|Configuration Name||The name of the configuration.|
|Configuration Type||The configuration type.|
|Configuration String||The location of the configuration. The location can be a path, an environment variable, a Registry key, a parent package variable name, or a table in a SQL Server database.|
|Target Object||The name of the object with a property that has a configuration. If the configuration is an XML configuration file, the column is blank, because the configuration can update multiple objects.|
|Target Property||The name of the property. If the configuration writes to an XML configuration file or a SQL Server table, the column is blank, because the configuration can update multiple objects.|
In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
In Solution Explorer, double-click the package to open it.
In SSIS Designer, click the Control Flow, Data Flow, Event Handler, or Package Explorer tab.
On the SSIS menu, click Package Configurations.
In the Package Configuration Organizer dialog box, select Enable package configurations, and then click Add.
On the welcome page of the Package Configuration Wizard page, click Next.
On the Select Configuration Type page, specify the configuration type, and then set the properties that are relevant to the configuration type. For more information, see Package Configuration Wizard UI Reference.
On the Select Properties to Export page, select the properties of package objects to include in the configuration. If the configuration type supports only one property, the title of this wizard page is Select Target Property. For more information, see Package Configuration Wizard UI Reference.
Only the XML Configuration File and SQL Server configuration types support including multiple properties in a configuration.
On the Completing the Wizard page, type the name of the configuration, and then click Finish.
View the configuration in the Package Configuration Organizer dialog box.
Technical article, Understanding Integration Services Package Configurations, on msdn.microsoft.com
Blog entry, Creating packages in code – Package Configurations, on www.sqlis.com.
Blog entry, API Sample – Programmatically add a configuration file to a package, on blogs.msdn.com.