title: TransactionScope and deadlocks in sproc
body: <p>I've got a <code>sproc</code> that basically goes:</p>
  
  <pre><code>begin transaction
      SELECT
      UPDATE
      INSERT
  commit transaction
  </code></pre>
  
  <p>This <code>sproc</code> is called inside a loop from two different threads in my application, both within a <code>TransactionScope</code> with default options.</p>
  
  <p>Occasionally, my application deadlocks:</p>
  
  <blockquote>
    <p>"Transaction (Process ID 184) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."</p>
  </blockquote>
  
  <p>Is there anything I can do about this? Should I use a different isolation level?</p>