Home » SQL & PL/SQL » SQL & PL/SQL » Closing cursors - but its does not? Error: maximum open cursors exceeded (Oracle 12c)
Closing cursors - but its does not? Error: maximum open cursors exceeded [message #645158] Sat, 28 November 2015 00:30 Go to next message
wmgonzalbo
Messages: 98
Registered: November 2008
Member
Hi OracFAQ,

We have a batch run that processes a huge amount of accounts - it does alot of processing per accountID.

We have an Oracle package who does the following:

* Processes data
* Has Stored procedures that contains SQLs and outputs a cursor which the java BE code reads and processes the dataset/cursor (together using other stored procs in the package as well) and stores it as one huge CLOB.

We checked the java code, it explicitly closes the cursors of the procs after its done reading them.
It also does a Commit after its done on each AccountID.

But we still get the error: ORA-01000: maximum open cursors exceeded

During execution, I monitored the highest open cursor count in the DB, and it just keeps increasing.
For now as a work around, we've set our max open cursor value in thousands range.

Any thoughts or advice on this on how to properly resolve this?

Database: Oracle 12c

Regards,
W

[Updated on: Sat, 28 November 2015 00:32]

Report message to a moderator

Re: Closing cursors - but its does not? Error: maximum open cursors exceeded [message #645164 is a reply to message #645158] Sat, 28 November 2015 00:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Whatever you think the code does NOT close each opened cursor.

Re: Closing cursors - but its does not? Error: maximum open cursors exceeded [message #645194 is a reply to message #645164] Sat, 28 November 2015 08:19 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Any thoughts or advice on this on how to properly resolve this?

Fix the code to really CLOSE every cursor.
Oracle is too dumb to lie about open cursor count.
If you disagree, then submit Bug Report to MOS.
Previous Topic: sql queries
Next Topic: Delete duplicate records without Rowid and drop (2 Merged)
Goto Forum:
  


Current Time: Fri Apr 26 07:57:57 CDT 2024