Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01000 max cursors exceeded
OK - I have sorted the problem.
My handle for my statements was being allocated for me by my call to OCIStmtPrepare2 - so I could cancel this using OCIStmtFetch2 with nrows = 0 and OCIStmtRelease.
However, my handle for cursors (used explicitly and solely for result sets from stored procedures) was a handle I was allocating myself using OCIHandleAlloc, so calling OCIStmtFetch2 and OCIStmtRelease was a nonsense. I have changed the code which cancels the cursor handles to call OCIHandleFree (followed by an OCIHandleAlloc - since I still need it) - and now I can set my open_cursors to sensible values (as I test I've set it to 10 - for production I think I'll leave it at 50).
I'm not entirely thrilled about having to free and allocate my cursor handle all the time but I will live with it for now.
Thanks for everyone's input and I'm glad I've finally sussed this out!
Cheers
Alex
Received on Thu Feb 10 2005 - 04:49:24 CST