title: How to make SSIS package dynamically choose the desired connection manager?
body: <p>I have an SSIS package with a OLE DB connection manager to 'SQL Server 1', as well as flat file managers that come from the D disk of the local machine. </p>
  
  <p>The package basically retrieves data from the D disk of the machine I am using, and through a series of loop containers with SQL tasks, sends it to 'SQL Server 1'. This all works completely fine.</p>
  
  <p>The challenge is that I would like to deploy the exact same package to 'SQL Server 2'. All files, tables, etc are exactly the same in 'SQL Server 2', as well as the files in the D disk of the local machine where 'SQL Server 2' is located. However, I don't know how to do this.</p>
  
  <p>If I change the OLE DB connection manager to 'SQL Server 2', all works perfectly, as the SQL tasks automatically choose the only connection that exists. Nonetheless, the point is to somehow do this dynamically.</p>
  
  <p>This means having both 'SQL Server 1' and 'SQL Server 2' as OLEDB connection managers, and deploying the same SSIS project to both servers (right now it is only deployed to 'SQL Server 1').</p>
  
  <p>I have created, under Project - Properties, a new configuration that has 'SQL Server 2' selected as the Server Name for deployment. Originally, only one existed, which of course has 'SQL Server 1' as the server for deployment. I know this is not enough, but don't know what else to do.</p>
  
  <p>The objective is to deploy the same package to Server1 and Server2, and any help would be greatly appreciated. Thank you</p>