CloseAll not closing cursors...

Hi all,
Our cursor limit per user is set to 750, which our DBA says is quite high, but we are still getting
getting the dreaded "Maximum opened cursors exceeded" error! I have gone through and ensured that CloseAll is being called when a query is no longer needed, but this does not seem to actually close any hanging cursors.

DOA Version : 4.0.6
Oracle Client : 10.1.0.4 ( in oci.dll )
thought PL/SQL developer says OCI:9.2 in the about box.

Is there anything I am doing wrong? Is this broken in the the 4.0.6 version of DOA?
 
I don't think anything is broken in DOA. Note that if you call CloseAll, the cursors are not immediately closed. They are closed as part of the next database access operation. Also note that you may have a "cursor leak" if you dynamically create TOracleQuery or other components, and forget to free them.
 
Hi Marco,
I have gone through and ensured that all dynamically created TOracleQuery's are freed, but regardless of this, shouldn't CloseAll, close any hanging cursors?

Are you, or anyone else aware of issues with this version of Oracle Client?
 
Марко прав.
Смотри время жизни переменных.
Там сказано насчет курсоров: если вы объявляете курсор в блоке то при выходе из этого блока (begin .. end;) курсор автоматически закрывается. Это не касается курсоров типа REF CURSOR и их надо закрывать вручную.
В некоторых книгах авторы рекомендуют закрывать созданные вами курсоры вручную всегда чтобы избежать таких ситуация как "Maximum opened cursors exceeded" error
 
Back
Top