It is very difficult for us to identify an error in one of our software solutions, which sometimes leave an open transaction. We have this application in production on several sites (read: 70+), and we have seen this problem twice this year in different places.
The problem we are facing is a transaction that remains open from a permanent connection to SQL Server. Using dbcc opentran shows that one transaction remains open. In today's case, it was open from 9:30, before we realized it at 13:00. Closing a program using a connection will close / cancel the transaction, and all data in the morning is still lost.
Using dbcc opentran , he replies that the name of the open transaction was user_transaction . Attempting to close it using commit tran user_transaction gives the error The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION. .
I understand that you almost never want to force a transaction without prior knowledge of the connection, but is there a way to do this? In this case, we closed the program, and we lost commercial value in a day.
Thanks.
source share