java sql SQLException - ORA-01000 maximum open cursors exceeded

0 votes

An ORA-01000 SQL exception is occurring for me. I ther, therefore, some questions about it.

  1. How closely do the maximum open cursors relate to the amount of JDBC connections, and how closely do they relate to the statement and resultset objects we have created for each connection? (We are ututilizing connection pool.)
  2. Is it possible to set the database's maximum number of statement/resultset objects (like connect single-threaded
  3. In a single threaded environment, is it prefeutilizeo utilise instance variable statement/resultset object rather than method local statement/resultset object?
  4. Does running a prepared statement while in a loop exacerbate this problem? Note: pStmt is closed once the loop has finished. (Of course, I could have used sqlBatch.)
{ //method try starts  
  String sql = "INSERT into TblName (col1, col2) VALUES(?, ?)";
  pStmt = obj.getConnection().prepareStatement(sql);
  pStmt.setLong(1, subscriberID);
  for (String language : additionalLangs) {
    pStmt.setInt(2, Integer.parseInt(language));
    pStmt.execute();
  }
} //method/try ends

{ //finally starts
   pStmt.close()
} //finally ends 

     5. What will happen if conn.createStatement() and conn.prepareStatement(sql) are called multiple times on single connection                   object ?

 

Sep 10 in Database by Kithuzzz
• 11,640 points
19 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
0 answers

java.sql.SQLException: Missing IN or OUT parameter at index:: 1

Using OJDBC 6, I created some Java ...READ MORE

Aug 15 in Database by Kithuzzz
• 11,640 points
237 views
0 votes
0 answers

The java.sql.SQLException: Fail to convert to internal representation

I want to do this query: String query ...READ MORE

Aug 20 in Database by Kithuzzz
• 11,640 points
59 views
0 votes
0 answers

java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/dbname [duplicate]

I have this Java program: MySQLConnectExample.java import java.sql.*; import java.util.Properties; public ...READ MORE

Aug 21 in Database by Kithuzzz
• 11,640 points
92 views
0 votes
0 answers
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

How to retrieve column names from java.sql.ResultSet?

You may refer the below code: ResultSet ...READ MORE

answered Jul 4, 2018 in Java by sophia
• 1,400 points
1,804 views
0 votes
1 answer

Establish JDBC Connection in R through single sign-on

You can certainly connect to databases with ...READ MORE

answered Sep 12, 2018 in AWS by Priyaj
• 58,080 points
1,463 views
0 votes
1 answer

Find Oracle JDBC driver in Maven repository

Download the jar and place it in ...READ MORE

answered Sep 26, 2018 in Java by Daisy
• 8,120 points
2,242 views
0 votes
1 answer

Accessing connection from different class in Java / MySQL?

You should just instantiate DoComms with every ...READ MORE

answered Nov 14, 2018 in Database by nirvana
• 3,130 points
1,055 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP