O'Reilly logo

Oracle Net8 Configuration and Troubleshooting by Jonathan Gennick, Hugo Toledo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required