This was directly from BOL.
/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.
Does this mean that I can specify which configuration file to use during runtime?
Or is just because I'm too desperate for that, I understood that way
Thanks
You are correct. You can specify which config file to use at run time via the command line switch /CONF|||
Phil Brammer wrote:
You are correct. You can specify which config file to use at run time via the command line switch /CONF
So if I use config1 as my package configuration file (using enable package configurations, this needs an absolute path and this is emdedded in the designer code, if I'm not wrong) during runtime I should be able to specify config2 as the package configuration file?
If this is possible, then I believe /conf flag ignores the config file passed.
Thanks
If you have config1 in the enable package configurations dialog, and specify config2 on the command line, config2 will also be applied, but config1 should have precedence, I believe.|||
Let me try a sample package and see what happens.
Thanks for the clarifications, I wish BOL was more clear.
|||I just tested this with a package that had a configuration (config1) set at design-time. The configuration was setting the value of a variable. I copied the configuration (config2), and changed the value that was being set. I then ran the package from the IDE and got the value from config1 (as expected). Then I ran it from DTEXEC, specifying config2 using the /conf switch and got the value from config2.
So it appears that configurations specified at runtime take precedence over the the configurations specified at design time.
|||
Can the config file be in the network?
|||
Karunakaran wrote:
Can the config file be in the network?
Sure, but it can't be a mapped drive if you are going to schedule the package.
You should be able to get away with \\server\share as the path to the config file, provided that the security on that network share is setup correctly.
No comments:
Post a Comment