title: Sql Transaction doesn't release lock after commit
body: <p>I have run a script similar to the one below in a SSMS query window. After the script run successfully, some locks remained on affected tables. When I try to close the window, a messagebox is showed asking me if I want to commit or cancel the transaction. </p>
  
  <p>After I choose one of the options, the locks are released.
  What can cause this behaviour?</p>
  
  <pre><code>begin tran
  delete from tableA
  delete from tableB
  insert into tableB
  insert into tableA
  commit tran 
  </code></pre>
  
  <p>I'm connected to a remote Sql Server 2014 and running localy SSMS 2014</p>
  
  <p>Thanks!</p>