If its a permissions issue how could that loop make half way through hitting the same tables and database/server?
just so you know my loop iterates almote 50k times, do you know of any limitation here?
50k iterations of a foreach loop is quite a lot - does the package run for a long time? Perhaps there is a more optimal solution.
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.