July 1, 2010
SSIS: How to Run a Set of Packages Concurrently in a ForEachLoop – But Be Careful!
3. I wanted a lazy-friendly approach.
4. I did not want to add and configure individual Execute Package tasks like in most traditional ‘parent’ packages. See point No.3
**Arguments = /c start Dtexec /FILE "C:\MyPackages\ChildPackage.dtsx"
*Change this path to match your environment.
** I used an expression against the arguments property of the task. This is because you have to change the name of the package to be executed on each iteration
• You may create an infinity loop of Dtexec executions if you are not careful. I learned this the hard way when I forgot to exclude the parent package from the loop. Thankfully, I was working in a development server and able to kill the process after few seconds, when more than 300 DTExec processes – instead of the 20 I intended - had been already started :)
Still want to try it? You can download a sample package from here: download sample
In the mean time, let me know if you can think of additional pro and cons, or perhaps of different approach?