title: Force a Transaction to commit from another connection?
body: <p>We have a very difficult to track down bug in one of our software solutions that sometimes leaves an open transaction. We have this application in production at a number of sites (read: 70+), and we've only seen this issue twice so far this year at separate locations.</p>
  
  <p>The issue we're having is a transaction that's being left open from the constant connection to the SQL Server. Using <code>dbcc opentran</code> shows that there is a single transaction left open. In today's case, it was open from 9:30 AM before we realized it at 1:00 PM. Closing the program with the connection will result in the transaction being closed/cancelled, and all the data from the day thus far lost.</p>
  
  <p>Using <code>dbcc opentran</code> it responds with the name of the open transaction was <code>user_transaction</code>. Trying to close it with <code>commit tran user_transaction</code> gives an error of <code>The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.</code>.</p>
  
  <p>I can understand you would almost never want to force the transaction to be committed without the prior connection's knowledge, but is there any way to do so? In this case, we closed the program and we lost a half of day's business worth of data.</p>
  
  <p>Thanks.</p>