TOracleDataSet.CloseAll and open cursors

Robson

Member
Hello,

I'm using the TOracleDataSet components in my application, i'm having a problem in the database with too many open cursors (often thousands per session). I understand you can use the CloseAll method to close these cursors, but after testing they remained open.

Only if the propery UseOCI7 is set to True this is working, but this setting cannot be used in the application because Net8 specific objects are used.

Some version info: using Oracle 9i, Delphi 5, DOA versie 3.4.6.4 (but also the latest version (Demo) changed nothing) and Oracle Net Client 9.2.

I have tried all solutions given in the forum, but nothing worked. Do you have any idea what could solve this problem? We don't want to raise the OPEN_CURSORS any higher.
 
Note that when you close a query, this is not immediately reflected in the v$open_cursor view. For optimization purposes the view will be updated when the application performs a subsequent database access operation.

In 4.0, is you set TOracleQuery.Optimize and TOracleDataSet.Optimize to False, cursors will be closed as soon as possible possible. If you run the DeptEmp demo project and set Optimize to False everywhere, you will see exactly 1 entry in the v$open_cursor view, and even that one will already have been closed.
 
Back
Top