Most answers from blogs and forums will now say that you need to create an environment and link it to the package, blah, blah. However, none of them mentions the fact that in order for the option to be enabled, you must have variables with MATCHING DATA TYPES!
Allow me to demonstrate.
- Create an environment:
Demo
- Create a variable:
Test, String
- Notice that the data type of the environment variable is different to the package paramter.
- Link the environment
Demo
to the packagePackage1.dtsx
- This is where most answers on the net stop. If you have done what I've told you to do up until now, your
"Use environment variable
option is still disabled/grayed out. Why? Because the data types are not matching. IMPORTANT - variable names don't have to match, only the data types. - Now let's finish it. Go back to the environment and create another variable that's Int32:
Aha, Int32, 0
- Go back to Configure... and click on "..." next to the package parameter
Test
- See how the
"Use environment variable"
option is now enabled?