Transaction Status

Anyone know of an easy way to trigger something which identifies that the current oracle connection has started or commited a transaction.

ps does setting a savepoint start a transaction if one does not already exist.
 
Is the OracleSession InTransaction member function what you're looking for?
Re your PS, I don't know, but if this was an exam question I would guess no.

------------------
Frans
 
In Oracle7 a Savepoint does not start a transaction, and in Oracle8 it does. If this were an exam, it would have been a trick question
wink.gif
.

------------------
Marco Kalter
Allround Automations
 
The inTransaction function lets me know the curret state but it would be nice if the database connection could trigger an event when the transaction state changes.

Our application is in and running but somewhere in there (a lot of code) a transaction is being held open which we cannot reproduce.

An event would allow us to provide something visible to the user. I could put the inTransaction into a timer but it is not a nice solution.
 
Such an event does currently not exist. It would be a rather expensive event (performance-wise), because it would require a check after each database access function.

In any case, right now you need to explicitly check InTransaction at strategic points in your application.

------------------
Marco Kalter
Allround Automations
 
Back
Top