Open Cursors

Hi, we are running into a "too many Open Cursors " problem on a client site.

By reading some old posts here I've learned that I should close the query with query.closeall.
I've monitored the cursor count with TOAD and did't see any differences between .close and .closeall. Even after query.free the cursor ist still open . !!??

Can anyone confirm this behaviour?
DOA 3.4.3 , Oracle 8.1.6
 
On Net8 / Oracle8 a Close or CloseAll will not immediately be reflected in the cursor count. This will happen when the next cursor is opened. This behavior will never lead to a "too many cursors" error, though it may be confusing.

This error can occur if you are actually using too many cursors. In that case you should increase the OPEN_CURSORS initialization parameter.

It can also be that your application has a "cursor leak", if you dynamically create TOracleQuery or TOracleDataSet and forget to free them.

Finally, if you are using Net8 8.0, you will run into a bug if you are using cursor variables. In that case Net8 will never close the cursors associated with the variable. Upgrade to Net8 8.1 or later, downgrade to SQL*Net, or set TOracleSession.Preferences.UseOCI7 to True (only possible if you are not using any Net8 specific objects).

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