- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Oracle cursor issue
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2001 02:55 AM
тАО09-04-2001 02:55 AM
Oracle cursor issue
I know this is not the correct place to post this question, but i am hopeful that i can get some lead.
We are running oracle 8.0.5 on HPUX1100 with June 2001 Patch Bundle. We have an java application that uses JDBC Thin driver 1.1 to connect to the database.
When the application is performing some batch jobs we get the error
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
When checked in v$open_cursor view the maximum cursors any session is using is 58 and we have configured the values of OPEN_CURSOR as 250. I am confused why this is happening.
What is going wrong...
Thanks in advance
...BPK...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2001 03:44 AM
тАО09-04-2001 03:44 AM
Re: Oracle cursor issue
The closing of the cursor change based on the tool you use:
In JDBC, preparedStatement.close() does closes the cursor.
Please check whether you have this in your application.
For ex;
Original Code:
// Detect lost or closed connection
rtmp.connection.sqlconn.prepareCall("select * from dual");
.....
Replaced by:
// Detect lost or closed connection
PreparedStatement st = rtmp.connection.sqlconn.prepareStatement("select * from dual");
st.execute();
st.close();
Thanks
G Manikandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2001 03:47 AM
тАО09-04-2001 03:47 AM
Re: Oracle cursor issue
Try to set the open_cursors in the init.ora to 2000. This should help you.
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2001 03:48 AM
тАО09-04-2001 03:48 AM
Re: Oracle cursor issue
I am positive that we are closing the prep statements.
I am wondering if there is another parameter apart from open_cursor which decides the number of cursors that can be opened.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2001 03:52 AM
тАО09-04-2001 03:52 AM
Re: Oracle cursor issue
Increasing open_cursor may help but I want to know what all these cursor are. If there is some kind of leak then even 1000 may not be enough....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2001 10:14 PM
тАО09-04-2001 10:14 PM
Re: Oracle cursor issue
This is from Oracle:
OPEN_CURSORS specifies the maximum number of open cursors (handles to private SQL areas) a session can have at once. You can use this parameter to prevent a session from opening an excessive number of cursors. This parameter also constrains the size of the PL/SQL cursor cache which PL/SQL uses to avoid having to reparse as statements are reexecuted by a user.
It is important to set the value of OPEN_CURSORS high enough to prevent your application from running out of open cursors. The number will vary from one application to another. Assuming that a session does not open the number of cursors specified by OPEN_CURSORS, there is no added overhead to setting this value higher than actually needed.
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 06:45 AM
тАО09-05-2001 06:45 AM
Re: Oracle cursor issue
A value of TRUE causes open cursors to be closed at each COMMIT or ROLLBACK. The cursor can then be reopened as needed. If cursors are rarely reused, setting the parameter to TRUE frees memory used by the cursor when the cursor is no longer in use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 07:14 AM
тАО09-05-2001 07:14 AM
Re: Oracle cursor issue
We cannot set
close_cached_open_cursors to true as this would cause the sql's to open a new cursor every time it gets executed. This would be severely degrade the performance of our application. We have stick to false.
I have one question..
Can we be 100% sure that the values shown in v$open_cursor are correct. ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 07:25 AM
тАО09-05-2001 07:25 AM