title: SQL Server 2005: Why Name Transactions?
body: <p>I've been sorting out the whole nested transaction thing in SQL server, and I've gleamed these nuggets of understanding of behavior of nested trans':</p>
  
  <ul>
  <li>When nesting transactions, only the
  outermost commit will actually
  commit.</li>
  <li>"Commit Trans txn_name", when nested
  , will always apply to the innermost
  transaction, even if txn_name refers
  to an outer transaction.</li>
  <li>"ROLLBACK TRAN" (no name) , even in
  an inner transaction, will rollback
  all transactions. </li>
  <li>"ROLLBACK TRAN txn_name" - txn_name must
  refer to the outermost txn name.
  If not, it will fail.</li>
  </ul>
  
  <p>Given these , is there any benefit of naming transactions? You cannot use it to target a specific tranasction, either for commit or rollback.
  Is it only for code commenting purposes?</p>
  
  <p>Thanks,</p>
  
  <p>Yoni</p>