Q

Getting ORA-01000 error when all statements and result sets are closed

I am getting ORA-01000 error, although I have properly closed all the statements and result sets. Also OPEN_CURSOR is set to 500. I am using Oracle 8.1.7. Please help!

I am getting ORA-01000 error, although I have properly closed all the statements and result sets. Also OPEN_CURSOR is set to 500. I am using Oracle 8.1.7. Please help!
Check your code again; you may still have cursors and/or result sets that are not being closed. You can use this query to view the number of open cursors for a given user ("SCOTT" in this example):
select o.sid, osuser, machine, count(*) num_curs 
from v$open_cursor o, v$session s 
where s.username = 'SCOTT' and o.sid=s.sid 
group by o.sid, osuser, machine 
order by num_curs desc;
You can also see the SQL associated with open cursors for a given session (identified by session ID [SID] from the above query results):
select q.sql_text 
from v$open_cursor o, v$sql q 
where q.hash_value=o.hash_value and o.sid = <sid>;
If you are able to verify that no cursors or result sets are being left open, you must increase the value of OPEN_CURSORS in your initialization parameter file, then shut down and start up the database instance for the change to take effect.
This was last published in January 2006

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close