Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded [message #2670] Mon, 05 August 2002 19:23 Go to next message
keane
Messages: 23
Registered: June 2002
Junior Member
Hi, i encountered this maximum open cursors exceeded problem. My code require to recursively call itself like the following
procedure recursive_call(columnI number) as
cursor c is select column_j from sample_table
where column_i = columnI;
begin
dbms_output.putline(columnI);
for rec in c loop
if rec.column_j > 0 then
recursive_call(rec.column_j);
end if;
end loop;
end;

How to rewrite the code so as to solve the maximum cursor exceeded problem? Thanks a lot.

-----------------
sample_table
(column_i number(5), column_j number(5));
-----------------
1 2
2 0
2 3
3 7
7 5
5 0
...
when the table become large, error occur

Keane
Re: ORA-01000: maximum open cursors exceeded [message #2671 is a reply to message #2670] Mon, 05 August 2002 21:48 Go to previous message
hanu
Messages: 21
Registered: March 2002
Junior Member
One option is increas the value of open_cursors to a big value(not sure about max allowed value) in init.ora file.
Previous Topic: Create Session
Next Topic: DBMS_JOB help...........
Goto Forum:
  


Current Time: Thu Mar 28 18:36:10 CDT 2024