SSIS 2008 R2 - How to dynamically change connections during runtime

GordyII picture GordyII · Feb 16, 2011 · Viewed 13.5k times · Source

I am using SQL Server SSIS 2008 R2.

I want to dynamically change a connection manager for OLEDB during runtime to point at a database determined during the running of the package.

This means that I cannot use configuration files.

How can I do this?

Answer

Sam picture Sam · Feb 16, 2011

You would use expressions and populate a variable with the connection property you would like to change. In the properties of each object, there is a field called expressions, which you can open up and dynamically change anything.