Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Package Configurations


Package Configurations

Author
Message
Brian Carlson
Brian Carlson
Old Hand
Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)

Group: General Forum Members
Points: 330 Visits: 467
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.
Ed Zann
Ed Zann
Mr or Mrs. 500
Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)Mr or Mrs. 500 (569 reputation)

Group: General Forum Members
Points: 569 Visits: 1391
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.



Alvin Ramard
Alvin Ramard
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2888 Visits: 11592
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

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
Brian Carlson
Brian Carlson
Old Hand
Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)Old Hand (330 reputation)

Group: General Forum Members
Points: 330 Visits: 467
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search