Im trying to follow the transaction control of a third party app that
uses a SQL server back end.
The app occasionally hangs or has ODBC call failed errors, which I have
identified using profiler as (usually) lock timeouts.
The app instance has its own connection controller that appears to roll
back transactions on any connections it has open if one of those
connections encounters an error.
I believe the app is holding transactions open for far too long.
Therefore I am now attempting to determine what causes the app to begin
or commit a transaction.
I have profiler capturing just about every event, yet I regularly see an
SQLTransaction Commit event with no corresponding begin event.
This is true even if I begin a trace before any client instance is
running (ie, before any connections are made).
I am not missing the begin tran due to the use of implicit transactions,
because when I do see a "set implicit transactions on" command come
through, I also see a begin tran in the trace.
Why am I not seeing all of the SQLTransaction (begin) events to match
corresponding SQLTransaction (Commit) events? Im finding it quite
frustrating to see a single SPID with a series of events like...
1 Audit Login (with set implicit transactions off)
2 SQL:BatchCompleted (set blah blah... irrelevant stuff)
3 RPC:Completed (exec sp_executesql...)
4 RPC:Starting (...exec sp_prepareexec...)
5 SQLTransaction (commit)
6 RPC:Completed (... exec sp_preparexec...)
This is the entire set of events for this SPID from login to transaction
commit. Where's the begin tran?