0
votes

I cannot find any solid information on when and how parent package variables are read by the child packages and whether they could suffer from race conditions.

Our team is building a system in SSIS 2008 system to handle a number of files. We want a single entry point (the parent package) which picks up the file, checks some config and conditionally calls one of several child packages to process it.

Some values, like the file name, need to be passed to the child package. What I'm wondering is, essentially, whether these are passed by reference or by value.

If I run MainPackage for file X.txt, which starts ProcessXPackage, and then (while it is still running) I run MainPackage for file Y.txt, which starts ProcessYPackage, is there a danger that ProcessXPackage might subsequently read the file name as Y.txt?

Or is the value read by the child package when it starts and stored locally so no modifications are possible?

Or even could I not run MainPackage a second time while ProcessXPackage is already running, as it is in its 'stack'?

1

1 Answers

0
votes

Values made configurable through parent package variables are one-way, the child package will use the parent package variable to configure itself but there is no link between the two variables at the different levels. The child merely copies the value from the parent variable at the start of execution time.

Are you running in development or have you deployed the packages to a server?

Development You will only be able to run one instance of your MainPackage, so this would not become an issue

Deployed When deployed, you can execute the same package (MainPackage) twice, but only in seperate processes. Since seperate instances for executing the same package cannot influence eachother (due to different processes), each process will use its own configuration (for file Y.txt or file X.txt) and thus your packages will execute for both configurations correctly.