Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Handling transaction started by closed connection

Author  Topic 

lebedev
Posting Yak Master

126 Posts

Posted - 2009-09-22 : 16:29:47
We have an application that opens a database connection and starts a transaction. What happens to the transaction if the connection is terminated, e.g. because of a network glitch, and the app doesn't have a chance to commit or rollback the transaction?

In other words, how does SQL Server handle transactions started by a connection that was since terminated?

Thanks.

Alec

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-22 : 16:58:38
If SQL Server isn't aware that the connection has been terminated, then the connection would be left open and therefore the transaction would be left in its current state waiting to receive further commands.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -