title: Out of memory exception in SQL Server 2012
body: <p>I am trying to execute a large sql script which contains about 1000000 simple <code>UPDATE</code>queries.</p>
  
  <p>The total size of this script file is about 100 MB.</p>
  
  <p>When I run this script I'm getting an Out Of Memory exception.</p>
  
  <p>When I split the file into chunks of 10 MB I can run each of them.</p>
  
  <p>However, I for convenience I would like to have only one script I can run at once. Is there any statement I can introduce so SQL server releases allocated memory after running each query so I can execute this large script at once?</p>