Subject Handling Long Transactions
Author dr_john_mp
Some advice please on handling transactions that stay open for
prolonged periods (hours -> days).

I have a number of users who tend to leave an application open on the
desktop with one/more open queries displaying data in a dbgrid. These
appear to be holding the Oldest Active Transaction. My understanding
is that this in turn inhibits garbage collection and thus
progressively slows the performance.

I noted a response to a message a few weeks ago suggesting that
setting the Default Action in the transaction to CommitRetaining with
the IdleTimer set to some period (in whatever units it uses) is not
the correct solution as this doesnt release the transactions and a
hard commit is required.

That seems to imply a need to create an OnIdleTimer event which as a
minimum will close/open the sql and then locate the originally
selected record. Is there a simpler alternative?


Also is there a way to identify details of the oldest transaction
(user name would be nice as would the actual SQL)?

Thanks in advance