JDBC connection to DB2/400

105 pts.

We have application which runs on Java Server connects DB2/400 using JDBC connection. would like to know what is the maximumnumber of database connections supported on DB2/400 and how can I adjust this connection activity so that it is not impacting our application running on as/400 i.e. how to imrpove the performance of as/400 to allow maximum number of connections.

Software/Hardware used:
JDBC drivers and DB2/400

Answer Wiki

Thanks. We'll let you know when a new response is added.

There is no maximun number of connections.
If your running the application now, then the question is are you have any performance issues? If you are, then you need to to the analysis to determine the cause and cure.

Discuss This Question: 5  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TomLiotta
    It probably depends on how much and what kind of performance tuning has been done previously to your system. How many memory pools do you currently run with during a normal day's workload? And how many jobs would be actively running in *BASE on average under normal workload? (Including TCP/IP servers, host servers and everything else.) Those questions are only meaningful in order to get a feeling for how far any previous performance tuning might have been done. Tom
    125,585 pointsBadges:
  • philpl1jb
    I don't believe there is a limit to the number of connections. I think tom is referring to the performance when you start doing stuff though all those connections. Phil
    53,770 pointsBadges:
  • TomLiotta
    I think tom is referring to the performance when you start doing stuff though all those connections. Yes, that's part of it. Mostly, performance analysis comes down to interpretation of measurements. Interpretation involves a set of assumptions that may or may not be true. The 'truth' values can be set correctly by some initial actions that are based on understanding what various performance measurements mean. The fundamental starting point is with the initial system from IBM. It comes with a bunch of default values, all of which may be changed to adapt the system to a company's needs. Most are never changed even though they should be. IBM assigns default values that allow the system to handle essentially any kind of workload. But it's impossible to have a large set of default values that will all work well. "Working" isn't the equal of "working well". Further, the default settings effectively make meaningful performance measurements impossible. They also make some performance features of the system ineffective. The QPFRADJ system value, for example, is largely useless as long as most work management attributes remain at their default settings. In short, if the system hasn't been prepared for performance measurements, then measurements will be meaningless at best and actually misleading in many cases. Various changes can be made to SQL statements to make them work better. Other changes can be made to the database structures to make SQL statements work better. But there are many changes that can be made to the system itself to make the entire system work better, including measurements. If the system itself is tuned and it can give precise info about how it's running, extra stuff like tweaking SQL statements becomes almost obvious. Tom
    125,585 pointsBadges:
  • Paulsundarsingh
    package com.ibm.db2.jdbc.app; import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.*; import javax.sql.*; import com.ibm.db2.jdbc.app.DB2Driver; abstract class Declare { protected String name; protected String age; abstract void convert(); } public class DB2Driver extends Declare { void convert() { try { Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection db2Conn = DriverManager.getConnection("jdbc:db2:empdetails","Administrator","anaconda"); //db2admin","db2admin Statement st = db2Conn.createStatement(); String myQuery = "SELECT * FROM empdetails"; ResultSet resultSet = st.executeQuery(myQuery); while (resultSet.next()) { name = resultSet.getString("name"); age = resultSet.getString("age"); System.out.println("Name: " + name); System.out.println("Age: " + age); System.out.println("-------------------------------"); } resultSet.close(); st.close(); db2Conn.close(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch (SQLException sqle) { sqle.printStackTrace(); } } public static void main(String[] args) { DB2Driver a=new DB2Driver(); a.convert(); } }
    Hello Mam/Sir,
    No compile error but...
    [This is the run time error Mam/Sir]
    java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
        at java.lang.Class.forName(Class.java:136)
        at com.ibm.db2.jdbc.app.DB2Driver.convert(DB2Driver.java:25)
        at com.ibm.db2.jdbc.app.DB2Driver.main(DB2Driver.java:54)
    Problem with driver "Cloudscape - Other Driver Default." (Error: Driver files not specified in driver definition.)          
                               - Cloudscape - Other Driver Default    Driver Problems
    Problem with driver "Generic JDBC 1.0 - Generic JDBC Driver Default." (Error: Driver files not specified in driver definition.)                                   - Generic JDBC 1.0 - Generic JDBC Driver Default    Driver Problems
    i try to many website and many coding but no result
     wt i will do Mam/Sir
    40 pointsBadges:
  • TomLiotta
    wt i will do Mam/Sir I would suggest placing this all in a new question. It's possible that no one will see it because it seems to be stuck on the end of a mostly unrelated thread. Create a question that describes the platform that your code runs on and the platform that contains the database. Include a description of the driver that you expect to be used. Add your code and the error as you did here. (When you paste code and use the {code} button, you need to mark the beginning AND the end of the code. You can either click the button once at the beginning and once at the end, or you can select/highlight the code and click the button once.) Tom
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: