Re: PLSQL: Closing all open cursors

  • From: "GovindanK" <gkatteri@xxxxxxxxxxx>
  • To: saints.richard@xxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 24 Jan 2008 13:52:13 -0800

Good Question. I would say "Yes".  If you happen to do repetitive
stuff inside a loop and you fail to close , you would soon run
into maximum number of open cursors exceeded.  An interesting
scenario i came across once was when the PLSQL back end was
selecting NULL for all the columns (single row returned to front
end Java) to handle exception situation so that the front end
gets a null pointer.  But the Java programmers did not close the
cursor on such NULL scenarios and soon afterwards we used to run
into max number of open cursors exceeded. Later the Java / Front
end code had to be modified to 'capture' this NULL scenarios and
forcibly issue close cursor.

HTH

GovindanK



Other related posts: