7.3 Discovery and Client Configuration

Team-Fly    

 
Oracle Net8 Configuration and Troubleshooting
By Jonathan  Gennick , Hugo Toledo
Table of Contents
Chapter 7.  Oracle Names


After you've created your Oracle Names server and defined your net service names, you'll want to configure your client to use the Names server for net service name resolution. There are several ways that you can go about this. If you are using the well-known Names server addresses, you can have your clients automatically "discover" the Names servers on your network. If discovery doesn't work, or if you are not using well-known Names server addresses, you can manually place entries in the sqlnet.ora file to point a client to a Names server.

Once you've made a client aware of the Oracle Names servers on the network, whether through discovery or sqlnet.ora entries, you need to modify the NAMES.DIRECTORY_PATH entry in your sqlnet.ora file to include ONAMES as one of the names resolution options. For example, the following entry will cause a client to attempt net service resolution using Oracle Names first. Then, if that doesn't work, the client will look in the tnsnames.ora file:

 NAMES.DIRECTORY_PATH = (ONAMES, TNSNAMES) 

See Chapter 3, for a list of all the values that can be used with NAMES.DIRECTORY_PATH.

7.3.1 Discovery

Oracle Names' discovery features are described in Chapter 2. They are an attempt by Oracle to make the use of Oracle Names as easy as possible. As long as you use one of the well-known Names server addresses (see Chapter 2 for a list of these), your clients are supposedly able to discover and use a Names server automatically. While this sounds great in theory, it doesn't always work in practice. When it works, it's wonderful. When it doesn't work, it's frustrating.

Discovery does not work in a hierarchical Oracle Names environment. (See Section 7.4 for a discussion of such environments.)

In a TCP/IP configuration, initiating the discovery process results in an attempt to contact Names servers at the following six addresses:

(PROTOCOL=TCP)(HOST=oranamesrvr0)(PORT=1575)
(PROTOCOL=TCP)(HOST=oranamesrvr1)(PORT=1575)
(PROTOCOL=TCP)(HOST=oranamesrvr2)(PORT=1575)
(PROTOCOL=TCP)(HOST=oranamesrvr3)(PORT=1575)
(PROTOCOL=TCP)(HOST=oranamesrvr4)(PORT=1575)
(PROTOCOL=TCP)(HOST=oranamesrvr5)(PORT=1575)

Each of these addresses is contacted in the order in which they are listed. When all the Names servers at these addresses have been discovered , the list is sorted in order of response time and written to a file named .sdns.ora ( sdns.ora on Windows NT systems) in your $ORACLE_HOME/network/names directory. The Names server with the quickest response is listed first, so it is the first one used in any attempt to resolve a net service name. The Names server with the slowest response time is the last one listed in the file.

7.3.1.1 Discovery using Net8 Assistant

To "discover" well-known Names servers using Net8 Assistant, perform the following steps:

  1. Run Net8 Assistant.

  2. Click on the Oracle Names Folder.

  3. Select Command figs/u2192.gif Discover Oracle Names Servers from the menu bar.

The discovery process takes a minute or two. If Net8 Assistant is successful in discovering one or more Names servers, it will write information about those Names servers to .sdns.ora . If not, it will ask you to specify the address of a known Names server.

7.3.1.2 Discovery using Names Control

You can initiate discovery from the Names Control utility by issuing the REORDER_NS command. That rather unintuitive command name originates from the fact that the resulting list of Names servers is sorted in order of response time.

7.3.1.3 Manually generating .sdns.ora

Discovery does not always work; this is particularly true of Oracle Names Release 8.1.6.0.0. For some reason, the discovery features in that particular release were buggy .

If discovery doesn't work, you can generate a .sdns.ora file manually. The format is fairly simple. Each line in the file contains the name and address of a Names server on your network. The first line in the file contains the IPC address of the Names server on your local node. Here's an example of a .sdns.ora file taken from a server:

 / = (ADDRESS=(PROTOCOL=IPC)(KEY=ONAMES)) ORANAMESRVR0.GENNICK.ORG=(ADDRESS=(PROTOCOL=TCP)(HOST=ORANAMESRVR0)(PORT=1575)) ORANAMESRVR1=(ADDRESS=(PROTOCOL=TCP)(HOST=ORANAMESRVR1)(PORT=1575)) 

On client machines not running a local Names server, the first entry still needs to exist, but it shouldn't contain an address. The following .sdns.ora file was taken from a client machine:

 / =  ORANAMESRVR0.GENNICK.ORG=(ADDRESS=(PROTOCOL=TCP)(HOST=ORANAMESRVR0)(PORT=1575)) ORANAMESRVR1=(ADDRESS=(PROTOCOL=TCP)(HOST=ORANAMESRVR1)(PORT=1575)) 

The .sdns.ora file is always in the $ORACLE_HOME/network /names directory. On Unix and Linux systems, the filename contains a leading dot. On Windows NT systems it does noton Windows NT and other Windows-based systems, the filename is simply sdns.ora .

7.3.2 NAMES.PREFERRED_SERVERS

If you prefer to manually specify the Names servers that you want to use for net service name resolution, you can do that using the NAMES.PREFERRED_SERVERS parameter in your sqlnet.ora file. In the following example, two Names servers are defined:

 NAMES.PREFERRED_SERVERS =   (ADDRESS_LIST =     (ADDRESS=(PROTOCOL=TCP)(HOST=jonathan.gennick.org)(PORT=1575))     (ADDRESS=(PROTOCOL=TCP)(HOST=donna.gennick.org)(PORT=1575))   ) 

When Net8 needs to resolve a net service name, it will first query the Names server running on jonathan.gennick.org. If the name is still unresolved , Net8 will next try donna.gennick.org. In other words, Net8 contacts each Names server in order until a name is successfully resolved.

You can edit the NAMES.PREFERRED_SERVERS setting using Net8 Assistant by opening the Local folder, highlighting Profile, and selecting Preferred Oracle Names Servers from the listbox as shown in Figure 7.18.

Figure 7.18. Defining a preferred Names server using Net8 Assistant
figs/n8c_0718.gif

When using Net8 Assistant, be sure to use File figs/u2192.gif Save Network Configuration in order to write your changes to your sqlnet.ora file.


Team-Fly    
Top


Oracle Net8 Configuration and Troubleshooting
Oracle Net8 Configuration and Troubleshooting
ISBN: 1565927532
EAN: 2147483647
Year: 2000
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net