Menu

#295 Can not Connect to Oracle DB

closed
nobody
None
5
2006-02-26
2005-09-09
Anonymous
No

When trying to connect to my Oracle databases using
the thin driver the "Connecting..." message appears and
then nothing else happens. Is there a way to see whatr
is going on behind the scenes, and possibly get a clue
as to what the problem is?

Discussion

  • Rob Manning

    Rob Manning - 2005-09-10

    Logged In: YES
    user_id=1287991

    Hello,

    At some point you should get an Error Dialog to appear
    stating the
    reason that you couldn't connect (exception message from the
    driver). The log file may also shed light on the issue. Look
    toward the bottom of
    <user.home>/.squirrel-sql/logs/squirrel-sql.log.

    One other thing to try - in Global Preferences, the SQL tab has
    a debug section. Turn on "JDBC Debug to Writer", and have a
    look
    at "jdbcdebug.log" in the same logs directory as above.

    Any details about the type of Oracle server, jdbc driver you
    are
    using?

    Rob Manning

     
  • Nobody/Anonymous

    Logged In: NO

    Nothing jumped out at me when I looked at the squirrel-
    sql.log file. I turned on the the JDBC debug as you suggested
    and the following was written to the file:

    JdbcOdbcDriver class loaded
    DriverManager.initialize: jdbc.drivers = null
    JDBC DriverManager initialized
    registerDriver: driver
    [className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.Jd
    bcOdbcDriver@146df77]
    registerDriver: driver
    [className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.
    OracleDriver@f546f8]

    I am running Oracle 9.2.0.5 on HP-UX. I was originally using
    the ojdbc14.jar for 9i. I read that there was a problem with this
    driver so I downloaded the 10g version of the driver
    (ojdbc14.zip). I added them both to the Extra Class Path with
    the 10g one sitting first.

    Any other suggestions?

    Thanks

     
  • Rob Manning

    Rob Manning - 2005-09-12

    Logged In: YES
    user_id=1287991

    I had issues with the 9i driver and switched to 10g as well.
    I don't think you need to include the 9i driver in the
    "Extra Class Path"
    setting. I've never worked with Oracle on HP-UX, but I
    imagine the
    same listener configuration is required. Can you connect
    with other
    java apps from the machine that SQuirreL is running on?

    Rob Manning

     
  • Nobody/Anonymous

    Logged In: NO

    I removed the 9i driver, however the same results still exist.
    And yes, I can run other java apps from the same machine. In
    fact I can connect to other Oracle Databases from Squirrel as
    well as the other java apps. I am having a problem with
    several of the databases I have at my dispossal. I was hoping
    to use Squirrel to understand what the problem is. It was
    suggested by someone else that the debug info Squirrel
    would provide would help me uncover the problem I was
    having connecting to these problem databases. Any other
    tools you can think of that I might try that may shed some
    light on this connection problem?

    Thanks.

     
  • Mz K

    Mz K - 2005-11-03

    Logged In: YES
    user_id=1371691

    HI--

    I'm basically in the same boat as nobody. I'm using the 10_g
    jdbc drivers. I am trying to connect to two different Oracle
    servers -- one on a linux box, the other solaris. Both are
    running version 9.2.0.6 of Oracle. I connect OK to the linux
    box, but not the Solaris box.

    One thing I noticed was that when SQuirreL starts up, it has
    some problem with laoding the Oracle plugin. This does not
    seem to effect connectivity to the linux box.

    Excerpts from my jdbcdebug.log are as follows--sorry about
    the ugliness. I'm really at a loss here. Next step is to
    contact the two different DB admins and see where the
    difference in setup is, if any, and/or explore the source
    for SQuirreL and look at what
    SQLDriverManager.getConnection
    is doing. :(

    ------------- log excerpt ----------

    DriverManager.initialize: jdbc.drivers = null
    JDBC DriverManager initialized
    registerDriver:
    driver[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,com.microsoft.jdbc.sqlserver.SQLServerDriver@4936f3]
    registerDriver:
    driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@13c66d8]
    SQLException: SQLState(null) vendor code(17002)
    java.sql.SQLException: Io exception: The Network Adapter
    could not establish the connection
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
    at
    oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
    at
    oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
    at
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
    at
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
    at
    net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:124)
    at
    net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:97)
    at
    net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:367)
    at
    net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
    at java.lang.Thread.run(Thread.java:595)
    SQLException: SQLState(null) vendor code(17429)
    java.sql.SQLException: Must be at least connected to server
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
    at oracle.jdbc.ttc7.TTC7Protocol.logoff(TTC7Protocol.java:389)
    at
    oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:434)
    at
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
    at
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
    at
    net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:124)

     
  • Gerd Wagner

    Gerd Wagner - 2006-02-26
    • status: open --> closed
     
  • Gerd Wagner

    Gerd Wagner - 2006-02-26

    Logged In: YES
    user_id=776065

    These problems very much seem to be driver specific problem
    that should be reproducible when you do

    Class.forName("<your driver class>");
    DriverManager.getConnection("<url>", "<user>", "<pwd>");

    in a simple test programm.

    So I guess it has got nothing to do with SQuirreL. I'll
    close this bug.

     

Log in to post a comment.