Tuesday, March 27, 2012

Configuration Files

Hi,

I’m having some issues associated with the configuration files that I can’t understand:

- Having a project with several packages using the same connections in each one (some packages use all connection and others I just have some of them), why can’t I use only one configuration file for all project. Assuming that I would have to configure all packages at least I would like to use always the same file. On the other way I would need 100’s of configuration files (one per package) to configure always the same connection, just because not all the packages use exactly the same connections.

- Having a configuration file on a machine, the package saves the full path, even if the configuration file lays in the same path them the project. When I change my project to another machine that doesn’t use the same file structure forces me to open every package and change the configuration file location.

Having 100’s of packages and a team of developers, even using the source safe, this makes the task just a little difficult

Thanks,
Vítor Ferreira

Sorry for the different fonts
|||

Vítor Ferreira wrote:

Hi,

I’m having some issues associated with the configuration files that I can’t understand:

- Having a project with several packages using the same connections in each one (some packages use all connection and others I just have some of them), why can’t I use only one configuration file for all project. Assuming that I would have to configure all packages at least I would like to use always the same file. On the other way I would need 100’s of configuration files (one per package) to configure always the same connection, just because not all the packages use exactly the same connections.

It is perfectly possible to do this (i.e. share a .dtsconfig file around multiple packages). I'd like to understand why you think it cannot be done.

Admittedly you do have the problem that if a config file references a property that doesn't exist in the package in which it is being used then you will get an error. I have asked for this behaviour to change in the future and I believe it will be.

In the meantime, I aways recommend that you should rationalise your configuration files - splitting them up so that you don't encounter the problem I just spoke of. On the project I have just completed we used a seperate config file for every single Connection Manager and this worked fantasically well because we could easily share config files between seperate packages - I would always take this approach in the future. In fact, I recommend it in my suggested best practices: http://blogs.conchango.com/jamiethomson/archive/2006/01/05/2554.aspx (number 14).

Vítor Ferreira wrote:

- Having a configuration file on a machine, the package saves the full path, even if the configuration file lays in the same path them the project. When I change my project to another machine that doesn’t use the same file structure forces me to open every package and change the configuration file location.

This is why you should use something else I always recommend - Indirect Configurations: http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2342.aspx

Hope that helps!

-Jamie

|||

Jamie,
It works just like you said, that's why i mentioned that i had packages not always using the same connection, because if they all have the same connections or variables used in the configuration file, I have no error. I already have thought on the approach you have mentioned, one configuration file for connection, and it’s probably the best solution.

Thanks,

Vítor Ferreira

|||

Vítor Ferreira wrote:

Jamie,
It works just like you said, that's why i mentioned that i had packages not always using the same connection, because if they all have the same connections or variables used in the configuration file, I have no error. I already have thought on the approach you have mentioned, one configuration file for connection, and it’s probably the best solution.

Thanks,

Vítor Ferreira

Absolutely!!

Its definately the way forward in this scenario. Also, if you use indirect configs its even easier to edit your package configurations because its simply a matter of selecting an environment variable from a list. It works really well!

-Jamie

|||

I would suggest that the indirect configuration feature be augmented to support configuring the root path of configurations from an environment variable. Then just configure the remaining path portion or filename from the designer.

This would allow a single environment variable for a set of packages and each package would just have the configuration file name that is maintained.

Fred

|||

Jamie,
Correct me if I am wrong, but to use environment variables to configure the configuration files path, I will need to use one environment variable for each configuration file, even if they lay all in the same directory!?

Thanks,
Vítor
|||

Vítor Ferreira wrote:

Jamie,
Correct me if I am wrong, but to use environment variables to configure the configuration files path, I will need to use one environment variable for each configuration file, even if they lay all in the same directory!?

Thanks,
Vítor

Vitor,

Correct. That's the approach we used on my last project and we were really happy with it.

-Jamie

|||I'm trying to setup my indirect configuration path using environment variables. I have an environment variable that contains the location of the configuration file. Once I do that I don't have the option to export any variables to this file anymore. Do I have to configure everything using a direct path, then once I'm finished, set it to the environment variable? This seems awckward...|||

Pirooz Javan wrote:

I'm trying to setup my indirect configuration path using environment variables. I have an environment variable that contains the location of the configuration file. Once I do that I don't have the option to export any variables to this file anymore. Do I have to configure everything using a direct path, then once I'm finished, set it to the environment variable? This seems awckward...

Pirooz,

Yes, this is the correct way. I can see how it could be improved like you suggest tho. Why not request it at Microsoft Connect?

-Jamie

sqlsql

No comments:

Post a Comment