Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Setting up Oracle Type-4 JDBC Driver

Re: Setting up Oracle Type-4 JDBC Driver

From: Paul Mahler <pmahler_at_pacbell.net>
Date: 1997/07/10
Message-ID: <33C570FB.811C244F@pacbell.net>#1/1

Jason Pugh wrote:

> After reading the documentation that comes with the new Oracle JDBC
> drivers, I'm under the impression that the only way to set up access
> to an Oracle database using the Type-4 ("thin") Driver was by using
> Oracle 8's connection manager.

I have successfully connected my java application to an Oracle 7.3 databaserunning the database server and the application on the same windows NT 4.0
machine.

I would suggest that you start with the "employee" example that you get in the JDBC download. The trick is to get the connection string set up right. here is the example that worked for my machine:

    // Connect to the database
    // You must put a database name after the @ sign in the connection URL.
    // You can use either the fully specified SQL*net syntax or a short cut

    // syntax as <host>:<port>:<sid>. The example uses the short cut syntax.

    Connection conn =
      DriverManager.getConnection ("jdbc:oracle:oci7:pmahler:1526:ORCL", "scott", "tiger");

jdbc:oracle:oci7 gets you the driver
pmahler:1526:ORCL is

    tcp/ip host name
    tcp/ip listener port
    instance name.

You can find the listener port in the oracle configuration file \ORANT\NETWORK\ADMIN\Listener.ora,
or whatever similar directory you have for your environment. You can find the instance name by
running the instance manager.

You will need to have the oracle JDBC class files in your CLASSPATH. You have to have a recent
enough version of Oracle that is compliant with the JDBC drivers. You have to have SQL/Net running.

>
>
> I'm not too familiar with Oracle, but I'm running a java servlet that
>
> connects to an Oracles 7 database and I'd like to get this working
> eventually through a Web Browser so I was wondering if the Type-4
> Driver would be the way to go. If so, does anyone know how to set
> this up for an Oracle 7 database?
>
> Any help greatly appreciated.
>
> Thanks.

--
Paul Mahler
Data Based Systems, Inc.
email: pmahler_at_databased.com

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzN/SC8AAAEEAMCuCCh/91S1tpCnuVKPprNfs1UACh9bMfDCJ6qmzjM9RA0b
4qUX/7QC8a8f/7weRYKdwBuejx2mJuOzy32LDuwnyFU3hexTBplotAS67M4JOnV2
YwO/OJGzW5rA8RTYIGx75c7fmG7gCJbWBIx2YbWlJaTZlGoUGZ14WfWZVswhAAUT
tCZQYXVsIFMuIE1haGxlciA8cG1haGxlckBkYXRhYmFzZWQuY29tPg==
=ei0y
-----END PGP PUBLIC KEY BLOCK-----
Received on Thu Jul 10 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US