Page 1 of 1
Too many cursors open
Posted: Mon 02 Jun 2008 13:56
by wchris
with ODAC 6.50 in Direct mode,
when using execproc on a procedure that returns a cursor, if the query that returns the cursor value result is "no data found" then ODAC generatates a "too many open cursors error" instead, followed by a "unknown error", and other errors ...
Can you reproduce this ?
Thx
Posted: Tue 03 Jun 2008 12:45
by Plash
Please provide us an example of stored procedure to reproduce the problem.
Posted: Tue 03 Jun 2008 14:23
by wchris
Sample done and sent to you, please tell me if you got it.
Thx
Posted: Wed 04 Jun 2008 07:39
by Plash
We have received your sample, and we have reproduced the problem.
Your stored procedure CRASHME1 never generates NO_DATA_FOUND exception. It generates exception 'Invalid cursor' when you execute
close CRASH_REFCURSOR;
for cursor that is not opened yet.
You will be notified when we fix the problem.
Posted: Wed 04 Jun 2008 09:25
by wchris
You are right, my sample does not generate the error today... probably because my cursors were left open on the database yesterday...
I'll investigate more. Thank you.
Posted: Wed 04 Jun 2008 10:23
by wchris
Tryed my sample again.
when i remove the "close sys_refcursor" from the crashme1.sql procedure it works ok. But When i put the close back the error i get is still 'too many open cursors'
i checked the opened cursors on the database with the following query :
select sum(a.value) total_cur, avg(a.value) avg_cur, max(a.value) max_cur,
s.username, s.machine
from v$sesstat a, v$statname b, v$session s
where a.statistic# = b.statistic# and s.sid=a.sid
and b.name = 'opened cursors current'
group by s.username, s.machine
order by 1 desc;
and the conclusion is that i don't have too many cursors open ... so why this misleading message ?
Thats all i've found. Hope it helps.
Thx
Posted: Fri 13 Jun 2008 10:39
by Plash
Today we have released the new ODAC build with the fix. Now error message is correct.