What happens if a client establishes a transaction, locks a row or table, and the client process crashes before it has a chance to rollback or commit the transaction? What, if anything, does SQL Server do with the transaction?
- Does SQL Server have a heartbeat mechanism to detect that the socket got killed?
- Upon detecting that a socket got killed, does SQL Server rollback the transaction automatically? Or does the row/table lock persist (causing other clients to deadlock)?
Please provide authoritative sources to back up your answer.
UPDATE: The client process is crashing. I am not talking about someone invoking the KILL command.