title: Troubleshooting SqlBulkCopy not doing minimal logging
body: <p>Based on the idea presented <a href="http://www.developerfusion.com/article/122498/using-sqlbulkcopy-for-high-performance-inserts/" rel="nofollow">here</a>, I've created a <code>QueuedDataReader</code> which wraps a <code>ConcurrentQueue</code> in an <code>IDataReader</code> so I can pass it to <code>SqlBulkCopy</code> and 'stream' data into the database.</p>
  
  <p>It works ok, and pretty fast, but the log file grows quite dramatically, even though I believe I've implemented everything suggested <a href="http://msdn.microsoft.com/en-us/library/ms190422%28v=sql.105%29.aspx" rel="nofollow">here</a>, <a href="http://msdn.microsoft.com/en-us/library/aa178096%28SQL.80%29.aspx" rel="nofollow">here</a> (and numerous other places).</p>
  
  <p>Two possibly important details are:</p>
  
  <ul>
  <li>I'm inserting into a dozen tables in parallel (that is, one <code>Task</code> per table)</li>
  <li>The tables have <code>IDENTITY</code> columns (which SqlBulkCopy is not inserting into), so I don't think the 'SORT' provisos are relevant.</li>
  </ul>
  
  <p>In addition to that:</p>
  
  <ul>
  <li>The tables are empty when I start inserting.</li>
  <li>I've tried both CLUSTERED and NONCLUSTERED indexes on the PRIMARY KEY, not much observable difference.</li>
  <li>I'm using <code>SqlBulkCopyOptions.TableLock</code></li>
  <li>I've tried with and without UseInternalTransactions, and various BatchSizes.</li>
  <li>The database is in SIMPLE recovery mode</li>
  <li>The tables do have FK constraints, but I've tried disabling/re-enabling them and it doesn't stop the log file growing (during insertion)</li>
  </ul>
  
  <p>The question:</p>
  
  <ul>
  <li>What are some things I could look at to try and troubleshoot what could be causing the log file growth?</li>
  </ul>