ORA-01000: maximum open cursors exceeded in WebSphere

Source: Internet
Author: User
Tags websphere application server
There are a lot of websites. Please forget it.

The ORA-01000 parameter determines the maximum number of cursor opened for a session.
It may be caused by an exception interruption without close, or the program writes the cursor is faulty, or there are indeed so many cusor applications at the same time.
First, check the database parameter, select Value
From v $ Parameter
Where name = 'open _ cursors 'it is recommended that a large application should be at least 1000. Then, query select O. Sid, osuser, machine, count (*) num_curs
From v $ open_cursor o, V $ session s
Where user_name ='Username'And O. Sid = S. Sid
Group by O. Sid, osuser, Machine
Order by num_curs DESC; there must be a session close to 'open _ cursors ', get Sid. Finally, check which SQL. Select Q. SQL _text these 'open _ cursors' are.
From v $ open_cursor o, V $ SQL Q
Where Q. hash_value = O. hash_value and O. Sid =XXXXXNow you should be able to locate the page or module that causes this problem.

WebSphere has a statement cache size parameter, which is also used for caching.
Check whether the configuration is large or not.

  • In WebSphere Application Server V5, navigate to the data source in the Admin console.Statement cache sizeAppears on the main data source configuration panel.
  • In WebSphere Application Server V6, navigate to the data source in the Admin console. Under additional properties, select WebSphere Application Server Data Source properties. The first property listed on the resulting screen isStatement cache size.

You can also setCursor_sharing = forceBut it depends on the specific environment.

Program problems, such:
When Java code executes conn. createstatement () and conn. preparestatement (), it is equivalent to opening a cursor in the database. In particular, if your createstatement and preparestatement are in a loop, this issue is very likely to occur. Because the cursor is always open and not closed.
We can also see the bucket issue in the case of itpub. The key is to find out which SQL statements Open cursor and then remedy the problem.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.