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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Diriver / DSN on UNIX system

Re: Oracle Diriver / DSN on UNIX system

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Tue, 15 Aug 2006 15:24:21 +0200
Message-ID: <44e1ccae$0$20033$9b4e6d93@newsspool4.arcor-online.net>


snehalssawant_at_gmail.com schrieb:

> fitzjarrell_at_cox.net wrote:

>> snehalssawant_at_gmail.com wrote:
>>> Hi all,
>>>
>>> I am writting a JDBC code which need a ORACLE DSN to connect to oracle.
>>> I dont know how to create a DSN on UNIX system. I m using ORACLE9.
>>> Can someone tell me in which file should i make an entry to create a
>>> DSN or if the DSN already exists then where should i find for that
>>> name?
>>>
>>> can someone tell me the exact path of file?
>>>
>>> In windows its pretty simple, using contol panel -> ODBC -> new DSN; i
>>> can create a new DSN and use it easily. But whats the equivalent on
>>> UNIX for it?
>> I would read the following link:
>>
>> http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96654/advanc.htm
>>
>> And stop trying to use Windows-centric functionality in a UNIX
>> environment.
>>
>>
>> David Fitzjarrell
> =================
> 
> Hi... thanks for the suggestion... but sorry to say that neither this
> url helped me nor the suggestion....
> 
> If you know how to connect to Oracle9 using JDBC on unix please let me
> know...
>

I should admit that i don't know almost nothing about java, but it seems to me, you are trying to use jdbc:odbc bridge as jdbc driver. If that is not a requirement, you should reconsider and use instead native jdbc driver. The jdbc:odbc bridge introduces an additional layer in your network connectivity and make the setup too complex compared to native jdbc driver. In addition, Oracle ships native jdbc driver ( at least with the last versions ) for most ( may be all?) plattforms, that is not the case for odbc driver - they are shipped only for MS plattforms and recently for Linux IIRC. So to build a jdbc:odbc bridge you have to buy a 3rd party software ( for example DataDirect ). In that case you can look in the documentation of this particular vendor (and it is mostly well documented) how to configure this bridge on unix (it may require to install and configure one of ODBC driver manager, such as iODBC or unixODBC) .
To use in opposite the native jdbc is (hell, i hope i'm correct here) as simple as
DriverManager.registerDriver(new oracle.jdbc.OracleDriver()); Connection conn = DriverManager.getConnection

                   ("jdbc:oracle:thin:@myhost:1521:orcl", "scott", "tiger");

Of course it can be well found in the documentation from the link David provided for you.

Best regards

Maxim Received on Tue Aug 15 2006 - 08:24:21 CDT

Original text of this message

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