Package Configurations

  • Hello,

    I am using XML package configurations to manage changing variables between environments. One problem I have is that I have to run multiple instances of the package on the same computer with different configurations. Within BIDS, it requires a hard-coded path to the config file, as far as I see. To deploy this, I remove the package configuration and then use dtexec with the /CONFIGFILE parameter to pick up the config files.

    This works, but it is tedious to remove the package configurations before releasing any packages. I have tested and if they are not removed, the internal hard-coded package config file overrides the command line one. Does anyone know if there is a way in BIDS to dynamically set the config file location? Thoughts I've had are making it run dtexec.exe with command line parameters, and using expressions, but I have not seen any way to do either.

    Thanks in advance for any help,

    Brian.

  • Instead of hard coding the path to the XML config file, there is an option to store the path in a user-defined environment variable. This is available in the Package Configuration Wizard. However, you may have to reboot the server to get it to see the new environment variable.

  • dtexec has a parameter for specifying the config file to use. Shouldn't that solve your problem?

    From http://msdn.microsoft.com/en-us/library/ms162810.aspx

    /Conf[igFile]filespec

    (Optional). Specifies a configuration file to extract values from. Using this option, you can set a run-time configuration that differs from the configuration that was specified at design time for the package. You can store different configuration settings in an XML configuration file and then load the settings before package execution by using the /ConfigFile option.

    You can use the /ConfigFile option to load additional configurations at run time that you did not specify at design time. However, you cannot use the /ConfigFile option to replace configured values that you also specified at design time. To understand how package configurations are applied, see Package Configurations and Behavior Changes to Integration Services Features in SQL Server 2008 R2.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Thank you both for your help. From within BIDS, the environment variable is what I was looking for. I have been in that screen too many times and wasn't paying attention to the other option available.

    Thanks,

    Brian.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply