It turns out that this advice, whilst appearing to work, is actually incorrect. The correct solution, and the actual problem, will be forthcoming in a new blog post by the 14th of September 2012.
When a package or a set of packages have been deployed to a location that differs from your development environment i.e. pretty much in almost every case you can imagine, DTExec will refuse to read the accompanying configuration file, causing a veritable cornucopia of frustration.
One of the useful features of SSIS is the ability to specify values for variables in various configuration sources e.g. SQL Server, the Command Line, Environment Variables, and last, but by no means least, an XML Configuration file.
With the XML Configuration file, though, you need some extra help. By default DTExec will use the variable values from the design time settings i.e. those that you put in when you were designing the SSIS package. To force DTExec to use the settings in the XML Configuration file you specified in your command line, use the following tip:
1. Just prior to saving the package, disable the package configuration. Don’t delete it, just disable it.
2. Regenerate a new GUID for the package. Package properties, ID (dropdown) “<Generate New Id>”.
3. Save the package. When the package is executed using DTExec it will read your variable values from the XML file, not from the design time configuration stored in the package.
I picked up this piece of advice from Jayaraj Sivadasan on the forums at SQL Server Central finding it after tearing my hair out for the better part of two weeks attempting, with other Google searches, to determine why my configuration file was being ignored and finding lots of information to suggest that ignoring the file was the default behaviour specified by Microsoft!
I never cease to be amazed by the “genius” that flows out of Redmond.
Further to this tip, there is a caveat that applies:
- Don’t execute any tests on configuration changes in the development folder. The package will read the values from the development configuration file and will initially appear to work correctly, until you change the values in the configuration file and discover that the values you have just entered do not appear in your output. Again, do not trust the man behind the Red(mond) curtain.
If someone can point out to me how this is supposed to work without having to resort to the magic outlined above, I'd be very interested in hearing about it.