title: SQL Server 2012 - No process on the other end of the pipe / TCP Provider 'forcibly closed'
body: <pre><code>using sqlcmd
  
  use &lt;database&gt;
  go
  
  :r foo.sql
  go
  </code></pre>
  
  <p><code>foo.sql</code> contains <code>INSERT INTO</code> a table; if <code>foo.sql</code> is short, say only 900 rows or so, things work fine; when foo.sql is long; say a 200,000 rows, batched into 900 rows each, the connection is closed.</p>
  
  <p>Advice welcome.</p>