DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Having problem with connecting to ORACLE databse with JDBC

  1. #1
    Join Date
    Aug 2003
    Posts
    8

    Having problem with connecting to ORACLE databse with JDBC

    Im trying to establish connection between ORACLE database and java program thru JDBC driver.
    I copied classes111.zip to the lib folder in jdbc at ORACLE_HOME. Then i changed the listener to add the SID_DESC and ADDRESS_LIST where i specified SID_NAME , PROTOCOL, HOST ,PORT. what should be the GLOBAL_DBNAME. I assigned the database name im using to GLOBAL_DBNAME. When i tried to execute it it gave me error message "connection refused" .Run time error was in the statement
    Connection conn =
    DriverManager.getConnection ("jdbcracle:thin:localhost:1521:testdb",
    "SYSTEM"....
    Can anybody help me in this regard.I appreciate their help

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142

    Re: Having problem with connecting to ORACLE databse with JDBC

    Originally posted by vmk
    "jdbc:oracle:thin:localhost:1521:testdb"
    The 4th parameter should resolve to the IP address of the server - so this will only work if you run it on the server. AFAIK it also needs a @ preceding it.

    I suggest you also test that you can connect to "testdb" using SQL*Plus (to make sure your listener config is OK) before you add the complication of this horrid JDBC stuff.

  3. #3
    Join Date
    Aug 2003
    Posts
    8
    thanks dude ill give it a try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width