Re: Oracle8i Personal and JDBC on Windows98

From: Rauf Sarwar <rsarwar_at_ifsna.com>
Date: 20 Jun 2002 18:21:52 -0700
Message-ID: <c2d690f2.0206201721.2eab9a31_at_posting.google.com>


shawnflahave_at_hotmail.com (ShawnF) wrote in message news:<8cc4ca37.0206200524.5e89d06c_at_posting.google.com>...
> I'm trying to connect to a local Oracle 8i Personal DB via JDBC on a
> windows 98 machine. I understand all the java code that is needed,
> and how to set the path and classpath; I'm having trouble with the
> Oracle part of it. What do I need to do to make this work? Does the
> TNSNAMES.ORA file or Net8 have anything to do with it? Any help is
> greatly appreciated...

If you are using oci8 driver with connection URL like jdbc:oracle:oci8:_at_<db_alias.domain.com> then you would need to install Oracle client (net8) and setup your tnsnames.ora file. The value for <db_alias.domain.com> is the same as you specify in your tnsnames.ora file. If you can connect from SQL*Plus to the database, you can use same db_alias in your oci8 connection.

I am not familiar with Personal Oracle 8 on Win98 or if it does/not have a listener.ora file under ORACLE_HOME\network\admin folder. If it does then read along,
If you are using thin JDBC driver with connection URL like jdbc:oracle:thin:_at_<HOST>:<PORT>:<SID> then you do not need net8 or tnsnames.ora file...don't even need Oracle client. The only caveat with using thin driver is that java uses TCP stack to connect to the database so you would need to setup your listener file on the server to accept TCP connections. Add following ADDRESS_LIST to your listener's DESCRIPTION_LIST if not already present,

   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = <HOST>)(PORT = <1521>))    )

Use <PORT> and <SID> value in your connection URL from your listener.ora file on your server.

HTH Received on Fri Jun 21 2002 - 03:21:52 CEST

Original text of this message