Re: java and oracle 8.1.7

From: Rauf Sarwar <rsarwar_at_ifsna.com>
Date: 20 Jun 2002 19:02:07 -0700
Message-ID: <c2d690f2.0206201802.38267dfd_at_posting.google.com>


Mike Alba <mike_at_netplasma.com> wrote in message news:<3D0F4F30.1010908_at_netplasma.com>...
> Hi,
>
> When you say you have problems with
> different jar files, what problems and
> what jar files were you using?
> The ones from $ORACLE_HOME/jdbc?
>
> Mike
>
> Vegard Hanssen wrote:
>
> > I need some help connecting a java-program to the thick jdbc driver.
> > Today I connect to the database with:
> >
> > Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
> > conn =
> > DriverManager.getConnection("jdbc:oracle:thin:_at_<computer>:1521:" +
> > sid, user, pwd);
> >
> > But I need to connect to a 8.1.7 with encryption, so I have to use the
> > oracle client instead of the thin client I'm using today.
> >
> > Any suggestion how to do this?
> >
> > This should perhaps be a java-problem, but I have tried different
> > jar-files and I seem to have problems with the jar-files shipped with
> > 8.1.7, so it could be a oracle problem for all I know.
> >

By thick JDBC driver I suppose you mean oci8 driver. To use oci8,

  1. Install Oracle client and configure your middleware (net8)
  2. Setup tnsnames.ora file with the connection string e.g. <Your_Alias>= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = <HOST>)(PORT = 1521)) ) (CONNECT_DATA = (SID = <YOUR_SID>)) )
  3. Check your connection by connecting from SQL*Plus. If you can then go to step 4 else check your net8/tnsnames.ora/sqlnet.ora setup.
  4. Use oci8 connection URL in your connection like, DriverManager.getConnection("jdbc:oracle:oci8:_at_<Your_Alias>, user, pwd);
Received on Fri Jun 21 2002 - 04:02:07 CEST

Original text of this message