This may sound like an easy question but the answers on the net all point to the basics of setting up an environment and referencing it in the project/package.
The scenario that I have encountered was never mentioned anywhere so I thought it would be good to document the behaviour here.
Below is the steps to reproduce the problem:
1. Create a new package: Package1.dtsx
2. Create a new (package) parameter: Test, Int32, Required
3. Deploy the project.
4. Goto Integration Services Catalogs and navigate to the package.
5. Right click on the package and then Configure...
6. Click on "..." next to the package parameter Test
7. You will see that "Use environment variable"
option is disabled/grayed out.
Why is that?
To create Environment Variables, Go to the Control Panel -> System and Security -> System and click on the Advanced System Settings. Or Right-click on the My Computer, select the properties, and then select Advanced System Settings will open the System properties.
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.
Demo
Test, String
Demo
to the package Package1.dtsx
"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. Aha, Int32, 0
Test
"Use environment variable"
option is now enabled?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With