ORA-0100 Error opening cursor in Oracle resolution too large

Source: Internet
Author: User
Tags oracle database

Recently done projects encountered ORA-01000 errors, reference to some solutions, to solve their own problems to write down some of the experience.
Java accesses an Oracle database, and in the For loop code, if you omit the connection that was established by closing createstatment or PreparedStatement, an error occurs: ORA-01000.
Background knowledge:
Each use of Oracle with Createstatment or PreparedStatement statements opens a cursor, so simply increasing the number of open cursors in Oracle is not the solution.

Problem solving:
1: The first position is that those statements open cursors are too large.
Execute the following statement:
SELECT *
From V$open_cursor
where user_name = ' tech '

2: From the Sql_text field of the search results above, locate the SQL statement, and then go to the Java code to locate the code that executes the statements.
Add the Close method for the PreparedStatement or statement class.

Related Article

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.