SSIS Package Configuration using XML Configuration File Part 2

This article shows how to apply the SSIS Package Configuration using XML Configuration File stored in an environment variable with an example. We already explained the list of Package Configuration in our previous article.

It is a very useful approach while we are deploying the project. Because, you can save the configuration file at the client location, and create an environment variable point to that file. That’s all you have to do.

Before we start the Package Configuration, You have to create an environment variable. We already explained the step by step approach to create an environment variable in our previous article. Please refer to the SSIS Package Configuration Using Environment Variable to understand the same.

To add a new environment variable, please click on the Environment variables.. button.

SSIS Package Configuration using XML Configuration FIle Part 2 1

Once you click on the Environment variables.. button, below shown window will be opened. Here you can see all the existing variables and their values. Please click on the New… button to add a new variable.

SSIS Package Configuration using XML Configuration FIle Part 2 2

As you can see we are adding Variable Name as ConfigurationPath, and Variable Value = C:\Users\Suresh\Documents\ Visual Studio 2013\projects\ PackageConfigurations\ PackageConfigurations\ ExecutepackageConfigFIle.dtsConfig. 

It means we are creating an environment variable that contains the path of an XML configuration file. And the configuration file we are using is created in SSIS Package Configuration using XML Configuration File article

SSIS Package Configuration using XML Configuration FIle Part 2 3

Click OK to close the Environment Variables window

SSIS Package Configuration using XML Configuration FIle Part 2 4

SSIS Package Configuration using XML Configuration FIle Part 2

To add XML package configuration stored in an environment variable, right-click on the control flow region will open the context menu. Please select the Package Configurations.. option

SSIS Package Configuration using XML Configuration FIle Part 2 5

Once you select the Package Configurations.., a new window called Package Configurations Organizer is opened, as we showed below. Please checkmark the Enable Package Configurations to enable the configurations. Next, click on the Add button to add a new configuration.

SSIS Package Configuration using XML Configuration FIle Part 2 6

Clicking the Add button will open a wizard.

SSIS Package Configuration using XML Configuration FIle Part 2 7

Select Configuration type: Here, we have to select the configuration type. By default, SSIS selects the XML configuration file so, you don’t have to do anything.

SSIS Package Configuration using XML Configuration FIle Part 2 8

We already explained the Specify Configuration settings directly, so please refer to the SSIS Package Configuration using XML Configuration File article to understand the same. In this example, we explain the Configuration location is stored in an environment variable.& So, please select the same

SSIS Package Configuration using XML Configuration FIle Part 2 9

As you can see, we are choosing the Configuration Path variable. Remember, if you don’t find the newly created variable, please close the projects, and reopen the BIDS.

SSIS Package Configuration using XML Configuration FIle Part 2 10

Click the Next button

SSIS Package Configuration using XML Configuration FIle Part 2 11

Let me rename the Configuration name as Connection String Configuration, and Click the Finish button to close the wizard.

SSIS Package Configuration using XML Configuration FIle Part 2 12

Now you can see our newly created Path configuration that holds the connection string information inside the Environment variable.

SSIS Package Configuration using XML Configuration FIle Part 2 13

Let me run the package

SSIS Package Configuration using XML Configuration FIle Part 2 14