Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

BCP memory not releasing.

$
0
0

Hi, I am running BCP command to copy the data from a file to the database in a while loops. as the number of iterations goes up, the memory usage is grown to the extreme and it consumed all my 64 GB space. My system is crashed. 

How could I release the memory or How could I force the SQL Server to release the memory used by the BCP

declare @currentIteration int
set @currentIteration = 1
while @currentIteration <=5000
begin
exec master..xp_cmdShell 'bcp MyDB.dbo.Invoice01 in "D:\DataFiles\DataToDump_100.txt" -e"D:\DataFiles\error100.txt" -b 100  -t"|" -T -c'
end


Viewing all articles
Browse latest Browse all 12963

Trending Articles



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