Thursday, February 16, 2012

Cross Package Configuration Files

Configuration files are working great for me when I run a package "stand-alone". However, when one package executes another package I am having problems.

Assume the following two packages (each having connection info in a config file):

foo (with connection A - contained in foo.config)
bar (with connection B - contained in bar.config)

The package foo executes package bar. Where would I have to modify the connection information for connection B, so that foo would use this new connection information?

Thanks,
Scott

You can't. Parent packages can't see child package connections.|||There's 2 ways you *could* workaround this.

1) Store your ConnectionString in a variable (called variableA) in packageA. Have a property expression on connectionA that references variableA. Have a script task in packageB that populates a variable (variableB) with the value of variableA. Have a property expression on connectionB that uses variableB

2) Call connectionA and connectionB the same thing and have them use the same .dtsconfig file

One of these methods is very easy. One should be avoided at all costs. I'll let you decide which is which :)

-Jamie

No comments:

Post a Comment