Too many cursors open

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wchris
Posts: 51
Joined: Thu 09 Jun 2005 09:44

Too many cursors open

Post by wchris » Mon 02 Jun 2008 13:56

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 03 Jun 2008 12:45

Please provide us an example of stored procedure to reproduce the problem.

wchris
Posts: 51
Joined: Thu 09 Jun 2005 09:44

Post by wchris » Tue 03 Jun 2008 14:23

Sample done and sent to you, please tell me if you got it.

Thx

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 04 Jun 2008 07:39

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.

wchris
Posts: 51
Joined: Thu 09 Jun 2005 09:44

Post by wchris » Wed 04 Jun 2008 09:25

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.

wchris
Posts: 51
Joined: Thu 09 Jun 2005 09:44

Post by wchris » Wed 04 Jun 2008 10:23

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 13 Jun 2008 10:39

Today we have released the new ODAC build with the fix. Now error message is correct.

Post Reply