Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-01000 - max open cursors exceeded problem

Status
Not open for further replies.

dendenners

Programmer
Jul 17, 2001
110
IE
Hi there,
I have this jave program to insert the contents of a file into an oracle database. The stipulation is that if any errors occur while running through the program, any records added to the database must be rolled back. This worked fine up to now, but unfortunately I have just received a file that contains 35000 records, and while processing it I ran in to the above error. I believe this is caused because I do not perform a commit until the very end of my program, and thus am asking the database to hold 35000 open cursors. Does this sound right and if so, is there any way around this limitation?
Thanks
 
i think you will find the code does this


label a
open cursor
fetch row
process stuff
exception do this
close cursor
label b

if the exception goes to either label a or label b after handling the 'error' then this cursor is never closed, if you have more than 255 exceptions you exceed the open cursors. try to close the cursor even in exceptional cases I tried to remain child-like, all I acheived was childish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top