SSIS: User Variable Synch Issue With Package Configuration
I noticed today that if you (in BIDS) change the name or type of a user variable in SSIS, that change will not auto-propagate to any package configurations you have. Here's a package config entry for a user variable, mapping only to the Value attribute:
<Configuration ConfiguredType="Property"
Path="\Package.Variables[User::IsDebug].Properties[Value]"
ValueType="Boolean">
<ConfiguredValue>-1</ConfiguredValue>
</Configuration>
Notice how the name of the variable and the data type are embedded in the config entry. If you change these attributes of the variable in BIDS, you have to update the package configuration. (Love that -1 value for True too--like old school VB :-)
If you only change the type of a variable and not the name, the Package Configuration wizard will fix it if you click all the way through the wizard (clicking the Finish button) for each affected configuration. It will automatically write out the correct data type to the dtsConfig file.
If you change the name of a user variable that is mapped to a package configuration, you may prefer going to the dtsConfig file directly and fixing it yourself. If you open that configuration in the wizard, you will get an error like this one:
Some configurations from the file "C:\XXX\YYY.dtsConfig" could not be loaded for the following reasons:
\Package.Variables[User::test].Properties[Value]: The configuration refers to an object that does not exist in the package. Package path of the object: '\Package.Variables[User::test].Properties[Value]'.
This error is not fatal, however; the wizard will recover *only if* you make a change to trigger the re-saving of the configuration; if not, the file will remain out of synch. This should take care if itself, though, if you go into the wizard and find the variable in question and check the boxes you need as they were checked on the entry from before you changed the name.
When at runtime SSIS tries to apply an out of synch configuration when the name is out of synch, you will see this warning in the output window:
The package path referenced an object that cannot be found: "\Package.Variables[User::test].Properties[Value]". This occurs when an attempt is made to resolve a package path to an object that cannot be found.
I have not tested for what happens when only type is out of synch. Would it be a warning, or fatal? If someone finds out what happens, please post below.
To be fair, this kind of thing is normal for a 1.0 product, and I'm hesitant to label it a bug. But it's something to be aware of--especially if you deploy a changed package without redeploying a new config file to go with it, which is a common scenario when pushing into existing test, staging, and production environments.
Best,
Dan


Recent comments
3 weeks 5 days ago
3 weeks 5 days ago
38 weeks 5 days ago
39 weeks 4 days ago
39 weeks 4 days ago
40 weeks 4 days ago
41 weeks 20 hours ago
41 weeks 21 hours ago
41 weeks 2 days ago
41 weeks 3 days ago