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: port number of ORACLE for JDBC

Re: port number of ORACLE for JDBC

From: John F. Keaveney <keaveney_at_cyp.com>
Date: 1998/01/11
Message-ID: <69b872$5r7$1@prefetch.san.rr.com>#1/1

Look at your tnsnames.ora file. It will include the port and the Oracle SID you need for your connection

    Thanks,

        John
Anne Hanson wrote in message <34B05BF6.31A7_at_ix.netcom.com>...
>I am trying to use JDBC to connect to our Oracle database. I am using
>the QueryApp example from the Oreilly book "Database Programming with
>JDBC and Java." I keep getting "connection refused" when trying to
>connect with JDBC. I can connect to the database using sqlplus so I
>know it is up and functioning. I suspect that I am using the wrong
>port number in my URL for the getConnection() call. I am using port
>1521 in my URL but I don't know how to find out if that is the correct
>port. How do I find out the port number to use in my JDBC code?
>
>My environment is:
>
>Sun Solaris 2.5.1
>Oracle 7.2.3.3.0
>jdk 1.1.4
>oracle jdbc driver (latest driver from oracle - sorry don't know the
>version)
>
>My URL looks like:
>
>jdbc:oracle:thin:@myhost.mydomain.com:1521:mysid
>
>Thanks in advance.
>
>Jeff Hanson
>Senior Software Engineer
>StorageTek
>Jeff_Hanson at stortek dot com
Received on Sun Jan 11 1998 - 00:00:00 CST

Original text of this message

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