Cursor variables

jabarreras

Member²
For every Query in my application I use cursor variables. I monitor how many cursors are opened every time they are executed watching V$OPEN_CURSORS. As you have supposed, two new cursors are created. The problem is when the Query is over and the data are displayed (with no data-aware controls, of course) I close both cursor variables, but those opened cursors are not destroyed, so the more users connected, the more opened cursors. The only way to release those cursors is to disconnect the session.
I do not know if this is the only way to free Database Resources.
Could you help me?
 
Net8 8.0 had a bug that would leak cursors when using cursor variables. If you are using Net8 8.0, you need to upgrade to 8.1, or set TOracleSession.Preferences.UseOCI7 to True. In that case you can't use any Net8 specific objects like LOB's and Objects though.

Note that the Oracle8 Server will also keep cursors opened when the are closed on the client. They will be closed when a new cursor is opened.

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