Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Best approach for looping

$
0
0
In a nutshell I need to execute a stored procedure about 60,000 times to update a staging table.  I have tried to implement a simple foreach loop passing a recordset of all the values but that apparently results in the eventual  hanging of the server because memory usage creeps up and up.  I also tried to implement a combination of a Foreach container inside of a For Loop while reading the values in chunks of 100 from another staging table but that resulted in the same apparent memory issue.  What is best practice for this sort of task?  Thanks very kindly. 

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>