Software Development
Blogs and Discussion
developer.*
Books Articles Blogs Subscribe d.* Gear About Home

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

User login

About our advertising.

Atom Feed

developer.* Blogs also has an Atom feed, located at this url.

Click here for more information about Atom.

A Jolt Award Finalist
Software Creativity 2.0
Foreword by Tom DeMarco

Recent Posters

Based on most recent 60 days, sorted by # of posts and name.

Google
Web developer.*

Who's online

There are currently 0 users and 36 guests online.

Syndicate

Syndicate content
All views expressed by authors, bloggers, and commentors are their own and do not necessarily reflect the views of developer.* or its proprietors.
Click to read the Copyright Notice.

All content copyright ©2000-2005 by the individual specified authors (and where not specified, copyright by Read Media, LLC). Reprint or redistribute only with written permission from the author and/or developer.*.

www.developerdotstar.com