On 27 Aug 2006 10:28:11 -0700,
jmecc@telus.net wrote:
>Configuring Oracle for JDBC
>
>I am trying to set up a Linux (I am using Fedora Core 4) server with
>Oracle 10g on it but can't seem to be able to connect to it using
>JDBC. I don't know how to get my machine to respond to a specific
>name, but can ssh into it from within my own network by using:
>
>ssh jmecc@192.168.0.110
>
>so I am trying the same with my JDBC connection string:
>
>"jdbc
racle:thin:@192.168.0.110:1521:test"
>
>I modified the listener.ora file to
>
>LISTENER =
> (DESCRIPTION_LIST=
> (ADDRESS=(PROTOCOL=tcp)(HOST=jbox.jdomain)(PORT=15 21))
> (ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)
> )
>)
>SID_LIST_LISTENER=
> (SID_LIST=
> (SID_DESC=
> (SID_NAME=test)
> (ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1)
> (PROGRAM=extproc)
> )
> )
>
>
>and started this service using lsnrctl. I still get a "The Network
>Adapter could not establish the connection" error though.
>
>The problem may be in the DB setup though, as I can't login even using
>sqlplus from accounts that are not part of the 'oinstall' &
>'dbus' groups. The 'oinstall' group gives too many permissions, so I
>shouldn't give this out to other users and anyway I don't know if
>a JDBC connection even assumes any particular user profile.
>
>Any input would be appreciated.
>Thanks,
>Jo
You shouldn't use a hardcoded ip in tnsnames.ora and a DNS name in
listener.ora
That you can't connect is a result from the server sending a different
address back than the address you hardcoded in tnsnames.ora.
Do NOT use hardcoded IPs, EVER!
--
Sybrand Bakker, Senior Oracle DBA