With Oracle, the tnsnames.ora file allows you to
connect directly to a database using the TNS "service name".
When an Oracle connection is requested, Oracle goes to the
tnsnames.ora file and looks-up the service name entry in the
tnsnames.ora file and gets:

1 - The host server name
2 - The protocol
3 - The port to use to connect to the server

But how does Oracle resolve the host name to an
IP address. In UNIX, special lookup files exist that pair the
host name with the IP address. Termed "Domain Name Services"
(DNS), the DNS is especially useful because when a server changes an
IP address, you only need to make the change in one place on the
server and all host name connections will immediately find the new IP
address.

Host name to IP address
resolution files

UNIX

/etc/hosts

Windows NT/2000/XP Pro

c:\winnt\system32\drivers\etc\hosts or hosts.sam

Windows XP

c:\windows\system32\drivers\etc\hosts or hosts.sam

In UNIX we vi the /etc/hosts file. In
Windows we open the hosts.sam file using Notepad.

Dynamic DNS resolution on
UNIX/Linux

The /etc/hosts file contains
the IP address, host name resolutions:

299.211.182.27 chicago
199.21.3.3 toyoko

To use DNS on UNX/Linux, you need to
ensure that the server is configured for DNS:

1. the /etc/host.conf should have the line:

order hosts,bind

2 - The /etc/nsswitch.conf should
have this line:

hosts: files nisplus nis dns

Dynamic DNS resolution on
Windows

In Windows XP we use DHCP, Dynamic Host
Configuration Protocol and this must be enables to use automatic host
name resolution.

DHCP Configuration for Windows XP:

Right click on "My Network Places" icon on your desktop or go to
the "Start Menu", select "Control Panel", then select "Network
Connections"

Note:This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.

Verify
experience!Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.

Errata? Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just e-mail:
and include the URL for the page.