SSIS parallel processing foreach loop
<p>I am writing an SSIS Package that reads records from one table and returns 20 SQL Servers names, the next steps that is <strong>foreach loop</strong> which fetches the database objects and creates a file of that db script. Even that is done with success but the question is it takes too much time that is approx. 3-4 hours to complete.</p>

<p>The Package flow is,</p>

<ul>
<li>SQL Task that returns 20 SQL servers - executing a single query</li>
<li>Second is <strong>Foreach</strong> <strong>Loop</strong>, that iterates through all the object from one server and generates a file which is stored to a location.</li>
</ul>

<p>The question is, </p>

<ul>
<li>Can we reduce the time from <strong>3 to 4 hours</strong> to a minimum? </li>
<li>Is it possible to let the foreach loop execute parallel? </li>
</ul>

<p>I am trying to divide <strong>ONE LOOP into to THREE Loops</strong>, that way I hope that will reduce the <strong>3 to 4 hours</strong> into <strong>1 hours</strong></p>

<p>Any suggestions are much appreciated.</p>

<p>Thank you!</p>