Solved

tnsnames.ora file --- including port along with Hostname/ IP address

Posted on 2004-09-18
2
303 Views
Last Modified: 2013-11-18
Can we include the port along with the IP address in tnsnames.ora file to connect to an IP address across a port (not in the same LAN network) ?

eg: HOST = 204.56.64.12 65012 (PORT = 1521)

or HOST = 204.56.64.12  (PORT = 65012)

both the above the examples did not work for me ,

any ideas/inputs/suggestions ?

(Btw, do we always need PORT =1521 to be included for oracle ? or are there any alternatives) ?

0
Comment
Question by:vsuripeddi
2 Comments
 
LVL 15

Assisted Solution

by:jdlambert1
jdlambert1 earned 65 total points
ID: 12096739
The correct syntax is:

(HOST = 204.56.64.12)  (PORT = 65012)

You can use any port number, but the client and server need to be configured on the same port -- it does no good to "talk" on one port number if the Listener isn't listening on that port. Also, since both computers should be behind firewalls, both firewalls will have to have the same port number open for Oracle traffic. Port 1521 is the standard (default) port for Oracle.
0
 
LVL 9

Accepted Solution

by:
konektor earned 60 total points
ID: 12099839
<database name, which u will use to connect>.<domain name, usually "world"> =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <IP of db server, or it's name>)(PORT = <port>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = <database SID>)
    )
  )

but <port> is the number of port on which database listerner listen. it is usually 1521 - but u can change it while installing (usually, when 1521 is used)
port is usually 4-digit, i'm affraid, that your number 65012 is port of something else ...
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Read about achieving the basic levels of HRIS security in the workplace.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question