SSIS Package Configuration

While deploying the packages to the production environment, it is a bad practice to edit the package configuration settings in BIDS. If you place connection manager details inside the package, then you have to edit them using BIDS only. To avoid these circumstances, we had SSIS Package Configuration settings. You can use them to save the connection manager details, variables, values, etc. Here, we show you the list of available SSIS Package Configurations and its description.

By default, the SSIS Package Configuration setting is not available in package designers. For instance, if you right-click on the control flow region, it will open the context menu. From the list, you can see there is no Package Configuration.. option.

SSIS Package Configuration 10

To get that SSIS Package Configuration option, Please navigate yourself to Project Menu and select Convert to Package Deployment Model sub-menu.

SSIS Package Configuration 11

Once you select that menu, a new pop-up window will display, as we showed below. Click the OK button

SSIS Package Configuration 12

After you click the OK button, SSIS will convert the current package into the deployment model. Click OK to close the conversion window.

SSIS Package Configuration 13

Now, if you right-click on the control flow region, the context menu will display the Package Configurations.. option. You can select this option to add the package configurations.

SSIS Package Configuration 14

Following are the list of Configuration types available in SQL Server Integration Services:

SSIS Package Configuration 15

Sample package for SSIS Package Configuration

We are going to use this package in the series of articles that explains each and individual package configuration type in SSIS. Before we get into the SSIS Package Configuration demo, let me show you the table that we are going to use. It is the Duplicate Employee Table in SQL Server.

SSIS Package Configuration 1

As you can see from the below screenshot, it is a simple package that contains one Execute SQL Task and Script Task. Please refer Execute SQL Task in SSIS Single Rowset article to learn the package configurations.

SSIS Package Configuration 2

Let me show you the configuration settings inside the Execute SQL Task. Here, we selected the Connection Type as OLE DB Connection, which is connecting to the SQL Tutorial database. Next, we are using the Direct Input as the SQL statement and write the custom SQL command. Lastly, we changed the ResultSet from NONE (default) to Single row.

SSIS Package Configuration 3

Let me click the … button to show the custom SQL Query.

-- SSIS Package Configuration Example
SELECT [FirstName]
      ,[LastName]
      ,[Education]
      ,[Occupation]
      ,[Sales]
      ,[HireDate]
      ,[YearlyIncome]
  FROM [DuplicateEmployee]
  WHERE [YearlyIncome] = ? AND
        [Education] = ?
SSIS Package Configuration 4

Under the Parameter Mapping tab, we are assigning the variables to the parameters. It means first question marks beside the Yearly Income assigned to Input Yearly Income variable, and the other question mark to Input education variable.

SSIS Package Configuration 5

As you can see from the below screenshot, we are assigning the previously created variables to all the columns that are returned by the SQL statement.

SSIS Package Configuration 6

I think I forgot to show the existing variables. Let me close the Execute SQL Task editor, and right-click on the design to select the variables.. option. From the below screenshot you can see the default values of InputEducation= Masters Degree, and InputYearlyIncome = 90000

SSIS Package Configuration 7

C# code inside the Script Task is as shown below.

SSIS Package Configuration 8

Let us Run the SSIS Package Configuration package to see the result.

SSIS Package Configuration 9