Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 14th, 2004, 02:06 AM
sachinborkar sachinborkar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 99 sachinborkar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 17 sec
Reputation Power: 5
Unhappy Too Many Cursors Error

I am using two types of cursors in my System Oracle 9i. One is a "For" Cursor and Other Cursor is a dbms.type Cursor as given below.

procedure pr_dup_bob_trun
as
stmt_str varchar2(50);
cur_hdl number;
rows_processed number;
begin
cur_hdl:=dbms_sql.open_cursor;
stmt_str:='truncate table dup_bob';
dbms_sql.parse(cur_hdl,stmt_str,dbms_sql.native);
rows_processed :=dbms_sql.execute(cur_hdl);
dbms_sql.close_cursor(cur_hdl);
end;

Even though all the Cursors are closed... Sometimes (One in 3-4 Months) it gives the following
"ERROR Occured at ORA-00604 Error Occured at recursive SQL Level ORA-01000 Maximum Open Cursor Exceeded"

I have checked all the Procedures thoroughly for any open cursors but there are none.

Does "For" Cursors have to be manually Closed??? Also What Happens When There is an Exception in the For Cursor that are Not handled, Does the Cursor remain open???

Please Help...


Regards,
Sachin

Reply With Quote
  #2  
Old January 15th, 2004, 09:37 AM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 44 m 30 sec
Reputation Power: 8
Oracle opens cursors implicitly. What is occurring is that the cursor resources are not being released and returned fast enough when the demand is high. You can modify this at the DBMS level but I would advise against that. You can also attempt to redefine your code to be more streamlined and utilized open resources.
__________________
El éxito consiste en una serie de pequeñas victorias día a día

MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Too Many Cursors Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT