Parameterized Connection Managers

Today’s post is from Bob Bojanic – a developer on the SSIS Team.


There is often a need to update connection manager properties for subsequent package runs. Whether you need to point to a different server or change credentials, file locations or some other connectivity detail, all those properties will be exposed on connection managers. People often assign expressions to these properties, and that way add flexibility of parameterizing values associated with connection managers. This is a good practice and we encourage people to continue doing it, as it forces SSIS developers to think of exposing and documenting necessary input sets for their packages.

However, we recognize people will sometimes forget or miss to parameterize these properties. Whenever that happens, it is certain that a need will arise, in the production, to quickly change one of connection manager properties (i.e. point to a different server, share, etc.).

A new feature we are adding to SQL Server “Denali” version of SSIS will keep stress of admins and op engineers under control. We are making sure to automatically parameterize all properties (except read-only ones and those already parameterized) of connection managers when a project gets deployed to the SSIS server. We will do this for both, shared project connection managers and those that belong to packages.

Let us show how it works on a simple example. We are going to use a small data flow to export a table from a database to a flat file.


The OLE DB Source component will get data from the Product table in AdventureWorks as can be seen below.


The Flat File Destination component will send data to the “c:\test\product.txt” file.


There is no need for additional settings in order to parameterize properties of these two connection managers. We can simply deploy the project with our simple package to the local SSIS server.


The connection manager parameters will behave the same way the regular parameters do on the server. They can be set in the same dialogs and values from environments can be referenced in the same fashion they are used for other parameters.

Once the package is deployed we can see all the parameters generated from connection manager properties in Configure or Execute dialogs. We can also change values of those parameters in those two dialogs. If connection manager parameters are changes in the Configure dialog those values will be applied in all subsequent package executions and validations. On the other hand, if connection manager parameters are set in the Execute dialog, they will be applied only for a current package execution.


Here is the example of changes we did for the simple package we have just deployed. The connection manager pointing to the AdventureWorks database is changed to point to another server (sqlcldb2) and the initial catalog on that server has a different name (SSIS_AdventureWorks) as well.


The flat file connection manager is changed as well, so the new connection string places our file (Product.txt) to a location on the drive d.


After we execute the package, the execution overview report will have the following section that lists our changed properties and their assigned values.


As you could see, the automatic connection manager property parameterization feature in SQL Server “Denali” is going to make updates, of connection parameters in production, an extremely simple task. That should increase flexibility in how packages are linked with external dependencies. An important class of configurations/updates will be allowed without a need to redeploy packages.

Let us know how you like this feature.

Comments (5)

  1. Jimmy says:

    Today how we deal with connection strings is to store the values in ASIs variables and use expressions to connect them to the connections.  I find this more flexible as it allows consistency in how configurations are all passed in the same way.  This also allows us to store the values in a database table and let the database server in each environment drive the configuration…

  2. Jimmy says:

    I guess the point is I need to play with this feature to see how it compares with how we do it today….

  3. Mustafa says:

    Would like to know how would we parameterize Connection Managers when the packages are deployed in File System..??

  4. L says:

    Is there any way to access environments in SSDT in interactive mode? Our environment consists of multiple development environments (one for each release). We have project level connection managers. Depending on which release we're working on, we point to the set of server that correspond.  Is there a way to run my packages in SSDT and point them to the correct environment from SSDT?  Manually modifying the project level connections every time does not seem like a workable solution.  During development, we need to run our packages interactively against the correct development environment.

  5. Puneet BI says:

    I am new to SSIS and I am just looking at an existing package. In one of the Sequence container there is a ‘Script Task’ component which read the source file attributes using a C# code. I can see all the variable (user) declared for ReadWriteVariables but I can’t find variable declared anywhere for the ReadOnlyVariable which is ‘$Package::fileName’

    I can see the connection for source file has Expression  Connection String  =‘$Package::fileName’

    Where is thie ‘$Package::fileName’ variable is created? I need to creat another package in the same solution bu I Can’t see ‘$Package::fileName’ in my package. Please suggest

Skip to main content