Oracle Advanced Networking Option Administrator's Guide Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index



Go to previous file in sequence Go to next file in sequence

CHAPTER 17. Configuring the NIS Naming Adapter


This chapter describes how to configure the NIS Native Naming Adapter into your network environment. It includes the following topics:

Refer to Chapter 13 in this guide and to "Integrating Oracle into your Native Naming Environment" in Chapter 3 in Understanding SQL*Net for information on how you can use the Native Naming Adapters provided by Oracle in your network environment.

What the NIS Adapter Does for You

Organizations and corporations already using Network Information Service (NIS) as part of their systems infrastructure have the option to store Oracle service names and addresses in NIS, using the NIS Native Naming Adapter.

Connect Using Familiar Oracle Service Name

After the NIS Naming Adapter is installed on clients and on servers that will need to make server to server connections (through database links), users can connect to a database server by specifying the Oracle service name. For example, if a database is in a user's default domain, the user would enter:

	sqlplus scott/tiger@payroll

If the database is located in an Oracle domain that is not the user's default domain, the user needs to specify the fully-qualified domain name; for example,

	sqlplus scott/tiger@payroll.us.oracle.com

System Requirements

The NIS Naming Adapter requires SQL*Net 2.2 or greater, and must be configured with Network Manager 2.2 or greater.

Installing the NIS Naming Adapter

To install the NIS Naming Adapter, use the Oracle Installer. Refer to your platform-specific documentation for information.

How the NIS Naming Adapter Interacts with SQL*Net and Oracle

When a user gives a command such as

	sqlplus scott/tiger@payroll

(where "payroll" is an Oracle service name) the NIS Naming Adapter on the node running the client program (or server acting as a client program) contacts an NIS server located somewhere in the network, and passes the service name to the NIS server. The NIS server resolves the service name into a SQL*Net address and returns this address to the client program (or server acting as a client program). The client program then uses this address to connect to the Oracle database.

Note: The service name should be the same as the global database name defined in the server's INIT.ORA file.

Oracle Database Service Names are Stored in a Separate NIS Map

A machine that acts as an NIS server runs a program called ypserv, which handles name requests. ypserv stores different types of data in special files called "maps". For example, passwords are stored in a map called passwd.byname. Oracle database service names are stored in a map called tnsnames.

Note: The tnsnames map is called a.smd in releases previous to 2.2.2.

When a user issues a command like the one in the previous section, the NIS Naming Adapter uses an RPC call to contact the ypserv program and passes the Oracle service name "payroll" and the name of the map--tnsnames. The ypserv program looks in the tnsnames map for the name "payroll" and its corresponding value, which is the address for the service name. The address is returned to the client, and the client program (or server acting as a client program) uses this address to contact the database server.

Configuring Clients to Use the NIS Naming Adapter

After installing the NIS Naming Adapter on clients and on servers that will make database link connections to other servers, you need to configure them to use the NIS adapter. To do so, use Oracle Network Manager.

Using SQL*Net 2.2 or Earlier

Use Oracle Network Manager to create the SQL*Net configuration files. Select NIS as a name service in the Native Naming page of the Client Profile property sheet. When Network Manager generates the configuration files, the following two configuration parameters appear in the SQLNET.ORA file.

	native_names.use_native=true
	native_names.directory_path=(nis)

The first line tells SQL*Net to use a Native Naming adapter to contact a native name service instead of a TNSNAMES.ORA file or an Oracle Names server.

The second line indicates which native name service to use. In this example, it uses the NIS Naming Adapter to contact an NIS server to resolve Oracle service names.

Using SQL*Net 2.3

For a client or server to use the NIS Naming Adapter, the NAMES.DIRECTORY_PATH parameter in the SQLNET.ORA file must include NIS. Set this parameter using the Names Services page of the Client Profile property sheet in Network Manager. For example:

	NAMES.DIRECTORY_PATH=(nis, tnsnames)

The first name resolution service listed as a value for this parameter is used first. If it is unavailable for some reason, the next is used, and so forth. In this example, NIS would be used. If it were unavailable for some reason, the TNSNAMES.ORA file would be used.

Configuring NIS Servers to Support the NIS Adapter

Before configuring servers to support the NIS Naming Adapter, make sure that NIS is configured and running on the NIS servers that need to resolve Oracle database service names. Consult your NIS documentation for specifics.

Add the tnsnames Map to the Existing Set of NIS Maps

To add the tnsnames map to the existing set of NIS maps:

Note: Keep a copy of the NATIVE.ORA file, preferably in your $TNS_ADMIN or $ORACLE_HOME/network/admin directory. You may need to use this file again later to load Oracle service names into the NIS map.

Note: The tns2nis program is supplied with the NIS adapter on the Oracle Installer tape or disk.

		tns2nis native.ora

Note: This step should be performed by the person in charge of NIS administration.

	# makedbm tnsnames /var/yp/`domainname`/tnsnames 

Making Sure the tnsnames Map Has Been Properly Installed

You can test the NIS server to see if the map has been installed properly by typing a command with the format:

For example, you might enter:

This returns the length of the address (in characters) followed by the address; for example:

	99 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)
  (HOST = garlic)(PORT = 1999)))
  (CONNECT_DATA=(SID=DIRPROD)))




Go to previous file in sequence Go to next file in sequence
Prev Next
Oracle
Copyright © 1996 Oracle Corporation.
All Rights Reserved.
Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index