title: Getting insufficient memory error while running 270 MB script on SQL Server 2012
body: <p>I am using SQL Server 2012, I have a script to update the DB, that script is approx 270 MB in size and contains some about 22,00,000 lines.</p>
  
  <p>Error :</p>
  
  <p><a href="https://i.stack.imgur.com/4ROSS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4ROSS.png" alt="enter image description here"></a></p>
  
  <p>Error message : System.OutOfMemoryException</p>
  
  <p>Also,</p>
  
  <p>I tried Transact-SQL command Query method but at particular line its giving error message.</p>
  
  <p>Sqlcmd: Error: Syntax error at line 709918 in file 'database.sql'.</p>
  
  <p>But there is not syntax error.</p>
  
  <p>Please provide any solution on this.</p>