Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle OCI Driver URL?

843854Oct 15 2003 — edited Jul 15 2004
Hi guys,

I'm currently trying to connect to an Oracle 9i database using the OCI driver.
My thin driver URL is:
jdbc:oracle:thin:@pc12.room22.dbgrad:1521:pc12
This works as it should. (BTW, pc12 is the schema name as well as the host name!)

What should the OCI driver URL be?
I've tried, amongst other things, jdbc:oracle:oci9:@pc12, but this gives an SQL Exception:
Exception in thread "main" java.sql.SQLException: Invalid Oracle URL specified
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:269)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:188)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at SaatTest.setUp(SaatTest.java:14)
at SaatTest.main(SaatTest.java:45)

My tnsnames.ora file seems fine.

Thanks

Jim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2004
Added on Oct 15 2003
5 comments
326 views