Defining Net Service Names
If
you’re
using local naming, the next step after configuring your Net8 Profile
is to define some net service names. When local naming is used, net
service names are defined in a text file named
tnsnames.ora
. If you are using Oracle Names, host
naming, or an external naming service, skip this section. None of
those name resolution methods make use of the
tnsnames.ora file.
You’ll find the tnsnames.ora
file in the
same directory as your sqlnet.ora
file. This is
usually your $ORACLE_HOME/network
/admin
directory. On some Unix
systems, a different directory may be used. In addition, the
TNS_ADMIN environment
variable (or registry
setting) can be used to override the default location of Net8
configuration files.
Tip
If you are running multiple releases of Oracle client software on one machine, you can use the TNS_ADMIN environment variable to point all those releases to one set of Net8 configuration files. See Appendix E, for details on doing this.
You can edit the
tnsnames.ora
file by hand using a text editor, or you can use one of
Oracle’s “assistants” to do the job for you. The
syntax for a tnsnames.ora
entry consists of a net service name followed by a description of how to connect to that service. The description is enclosed in parentheses, and elements in the description are also enclosed in parentheses. Some elements are lists that are further enclosed in parentheses. You can have nested lists, also enclosed in parentheses. There are enough parentheses ...
Get Oracle Net8 Configuration and Troubleshooting now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.