SSIS uses environment variables to configure data source connection Parameters

Source: Internet
Author: User
Tags ssis

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.