Subject Re: [IBO] Transactions closing
Author Thomas Steinmaurer
> I have just moved across to firebird 2.5 and have noticed some transactions are being left active for a lengthy period. I am manually controlling the transactions. AutoCommit is false, i am also using tiCommitted.

Either use IBO's tracing capabilities or use the Firebird 2.5 Trace API
to see exactly what's going on.
See my article on the Trace API here:

> I have found that if i am not commiting or rollbacking a transaction an query/dataset (TIB_Query) is automatically closed after a period of time.

IBO is doing that behind the scene to enable moving OIT/OAT forward.

However for store procedure (TIB_StoreProcedure) this transactions is
being left open.
> So my question is should i always be making sure i either commit or rollback whenever i use storeprocedure and have finished with it as such. (in the case of edit or insert data i always save it) but when i am reading data, rather than use a query i am sure SP and not always saving it after i got my data. Is this going to cause problems and is it bad practice?

In general, when you are done with something in context of an explicit
transaction, issue a commit/rollback to end the transaction.

Make also use of read-only transactions, if you don't need to write
something. With long-running read committed, read-only transactions,
OIT/OAT won't get stuck.

With regards,
Thomas Steinmaurer

* Firebird Foundation Committee Member

* Upscene Productions - Database Tools for Developers

* My Blog