Scenario
We hope we can select the parameters when executing the package. In this case, we can use the environment variables. In addition, all the packages can use the environment variables, which is more convenient when there are a large number of packages.
Step 1: Create an SSIS package
Create the oledb source and flat file destination Connection Manager in the data flow task.
Step 2: Configure parameters on the Connection Manager.
Right-click the Connection Manager and select "parameterize"
Step 3: Select connectionstring in the parameterize dialog window
Note that the default value is the same as when you create a connection. After you click OK, the parameter is displayed in the "parameter" tab.
Confirm the connection information in the "parameter" tab.
Step 4: Execute Data Flow task or the entire package in ssdt to ensure the execution is successful.
Step 5: deploy the project to SQL Server 2012 in ssisdb (now you should connect SQL Server in SSMs and enter integration services Catalog)
Step 6: Right-click environments and select "create environment ...."
Step 7: Right-click the project and configure the variable package.
Step 8: Configure parameters and reference environment variables
On the "Parameters" tab, view the parameter values:
View "connection managers" Information
In "configur ...." Click references in the window to reference the environment variable
Step 9: Set the prod variable in the Environment Variable
Step 10: bind a variable to the package Configuration
Step 11: Execute our package and select the bound environment variable.
Check Environment Variables
Reference:
Http://msdn.microsoft.com/en-us/library/hh213230.aspx
Http://blogs.msdn.com/ B /mattm/archive/2011/07/22/parameterized-connection-managers.aspx
Http://blogs.msdn.com/ B /mattm/archive/2011/07/25/all-about-server-environments.aspx
Connection: http://blogs.msdn.com/ B /meer_alam/archive/2014/08/11/ssis-data-source-connection-information-parameterization-with-environment-variable.aspx