This discussion is archived
7 Replies Latest reply: Nov 5, 2012 7:48 AM by 972586 RSS

RedHat 6, ojdbc6 drive for connection time slowly

952719 Newbie
Currently Being Moderated
version:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit


Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@192.168.1.2:1521:test";
String user = "test";
String pwd = "test";
long s = System.currentTimeMillis();
Connection c = DriverManager.getConnection(url, user, pwd);
long e = System.currentTimeMillis();
System.out.println("time:"+(e-s));


I use ojdbc6 drive in RedHat6 in get database connection time about 20 seconds, in Windows xp in about 300 milliseconds, don't know what the problem is, will drive replacement for ojdbc14, Windows xp and RedHat6 in get database connection in the same time, about 300 ms
  • 1. Re: RedHat 6, ojdbc6 drive for connection time slowly
    rp0428 Guru
    Currently Being Moderated
    Welcome to the forum!

    Thanks for posting yor full database version. Since JDBC involves java you should post the full Java version you are using.
    >
    I use ojdbc6 drive in RedHat6 in get database connection time about 20 seconds, in Windows xp in about 300 milliseconds, don't know what the problem is, will drive replacement for ojdbc14, Windows xp and RedHat6 in get database connection in the same time, about 300 ms
    >
    What does 'will drive replacement for ojdbc14' mean?

    That jar file does not support Oracle 11gR2 so you need to upgrade to a jar file that does. You mention ojdbc6 so which jar did you use in Redhat? Which one in XP? What machine is the DB itself on? Is it on the same box you are connecting from?

    Here is the official Oracle JDBC page that shows the Oracle DB versions supported for each of the JDBC drivers available and also describes the JDBC jars and what JDK versions they support.
    http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#02_01
    >
    Please note that JDK 1.4 is not supported by the 11 drivers.
  • 2. Re: RedHat 6, ojdbc6 drive for connection time slowly
    952719 Newbie
    Currently Being Moderated
    DB version:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
    JDK version: 1.6.0_17


    now issues

    RedHat6, ojdbc6 drive connection time slowly,connection time about 20-50 seconds
    windows xp ,ojdbc6 drive connection time very soon,about 200-300 milliseconds


    The above RedHat6 connection slow problem,
    I will drive replacement for ojdbc14 drive, connection quickly.about 200-300 milliseconds


    Why ojdbc6 in redhat6 in get connection time slow, JDK version 1.6, I try to download the latest ojdbc6 get connection time also is very slow.about 20-50 seconds
  • 3. Re: RedHat 6, ojdbc6 drive for connection time slowly
    rp0428 Guru
    Currently Being Moderated
    Still waiting for answers to the other questions ask.
  • 4. Re: RedHat 6, ojdbc6 drive for connection time slowly
    952719 Newbie
    Currently Being Moderated
    Thank you for your reply, I'm sorry, I have no problem detailed description to you.

    Lasted three machine
    1, database machine : RedHat6 system
    2, Testing a machine 1 : RedHat6 system
    3, Testing a machine 2 : winxp system

    Test database connection time
    Testing a machine 1: RedHat6 jdk1.6.0 _17 ojdbc6
    Testing a machine 2: winxp jdk1.6.0 _17 ojdbc6

    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url = "jdbc:oracle:thin:@192.168.1.2:1521:test";
    String user = "test";
    String pwd = "test";
    long s = System.currentTimeMillis();
    Connection c = DriverManager.getConnection(url, user, pwd);
    long e = System.currentTimeMillis();
    System.out.println("time:"+(e-s));

    1,testing a machine 1: database connection time of 20-50 seconds
    2,testing a machine 2: database connection time for 200-300 milliseconds

    In the test machine 1, appear for connection time slowly, I try to be ojdbc6 replacement for ojdbc14, connect time change very quickly. About 200-300 milliseconds.
    Testing a machine 1: RedHat6 jdk1.6.0 _17 ojdbc14

    I also try to update the JDK6U33, the latest ojdbc6, did not solve the problem for connection time very slow.
    So I will drive replacement for ojdbc14, only to replace it, get the database connection time to quickly

    Don't know why ojdbc6 in redhat6 in get connection time slow reason, can you help me

    Edited by: 949716 on 2012-7-30 下午9:49

    Edited by: 949716 on 2012-7-30 下午9:54
  • 5. Re: RedHat 6, ojdbc6 drive for connection time slowly
    952719 Newbie
    Currently Being Moderated
    Thank you, I don't know what else to not describe complete, please help me, thank you
  • 6. Re: RedHat 6, ojdbc6 drive for connection time slowly
    972586 Newbie
    Currently Being Moderated
    Problem perhaps related to entropy on Redhat 6 ?
    http://www.usn-it.de/index.php/2009/02/20/oracle-11g-jdbc-driver-hangs-blocked-by-devrandom-entropy-pool-empty/
  • 7. Re: RedHat 6, ojdbc6 drive for connection time slowly
    gimbal2 Guru
    Currently Being Moderated
    Hey thanks for that highly useful link! Probably not related to the original problem though, but it does describe a problem that is far worse.

    I wouldn't wait for an answer by the way, this thread is a few months old and the OP has given no sign of life since then.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points