title: Long SQL file runs SQL Server out of memory (22,000 lines)
body: <p>I have a file of a <code>.sql</code> file that is about 22,000 lines long. It's generated by something else, but basically just contains one update statement per line.  </p>
  
  <p>I get this error when I run the file in SQL Server Management Studio.</p>
  
  <blockquote>
    <p>There is insufficient system memory in resource pool 'internal' to
    run this query</p>
  </blockquote>
  
  <p>I think I just need to split this query file up, but I'm not sure the best way to go about it. I could cut the file into 2000 line chunks or something I suppose.</p>
  
  <p>This seems like a simple problem, and I will be doing this often enough I would like to come up with a good solution. Any ideas?</p>