Net8 Administrator's Guide
Release 8.1.5

A67440-01

Library

Product

Contents

Index

Prev Next

6
Configuring Naming Methods and the Listener

This chapter describes how to configure your network.

Specific topics discussed are:

Configuration Overview

Before a service, such as a database, can receive connections from clients, clients must be configured to use net service names. Net service names are network descriptions of service names. Each network description specifies one or more network routes to the service, including any number of Net8 components, such as listeners. Net service names also specify whether network connections should be load balanced among multiple listeners and/or fail over to an alternate listener if a network connection cannot be established.

Specifically, a net service name identifies the:

The listener address is used by the client to connect to the listener. Once connected, the client passes the address and service information to the listener.

When an instance starts, it registers the following registration information with the listener:

When listener receives a client's request for connect, it verifies the client information with the information it has received from the instance, as well as information it has stored in the LISTENER.ORA file. If the information matches, a connection is granted.

Client configuration is accomplished by creating a list of the net service names that map to services and addresses of listener destinations stored in a TNSNAMES.ORA client configuration file, an Oracle Names server, or another naming method. When an end user connects to a service, the service is identified by the net service name. For example:

sql> CONNECT username/password@net_service_name

Setting Service Names and Instance Names

A service name is a logical representation of a service, which may include a database. A service may comprise one or more instances. When creating a net service name, you must identify a release 8.1 service with a service name. Optionally, you may identify a release 8.1 instance with a instance name.

Shown below is a sample of TNSNAMES.ORA file, which shows how a net service provides a network description of a service:

net_service_name= 
(description= 
  (address= (protocol_address_information))
  (connect_data= 
     (service_name=service_name) 
     (instance_name=instance_name)))

In the example above, notice how the service name is identified by the SERVICE_NAME parameter and the instance name is identified by the INSTANCE_NAME parameter.

The service name is a string that is the global database name, a name comprised of the database name and domain name, entered during installation or database creation. If you are not sure what the global database name is, you can obtain it from the combined values of the SERVICE_NAMES parameter in the database initialization file, INITSID.ORA. For example, a service name may be SALES.COM, where SALES is the database name and COM is the domain.

The instance name includes the name of the instance. It is typically the SID entered during installation. If you are not sure what the SID is, you can obtain it from the INSTANCE_NAME parameter.

The table below describes the SERVICE_NAMES and INSTANCE_NAME parameters.

Parameter   Description  

SERVICE_NAMES  

One or more comma separated strings that represent the names of the services on the network. It is possible to provide multiple services names (by individual SERVICE_NAMES entries) so that different usages of a instance can be identified separately. Service names can also be used to identify a service that is available from multiple instances through the use of replication.  

INSTANCE_NAME  

A string value representing the name of instance and is used to uniquely identify a specific instance when multiple instances share common services names. INSTANCE_NAME should not be confused with the SID, which actually uniquely identifies the instances shared memory on a host.  

Configuration Models

Net8 configuration is based upon one of three models:

Network Configuration Model   Suitable When...   Naming Method  

Localized management  

Network addresses are mapped in a TNSNAMES.ORA file on each node (no Oracle Names server).  

Host Naming

Local Naming

External Naming  

Centralized management  

Networks where an Oracle Names server performs network address resolution. An Oracle Names server stores client configuration profiles in one location.  

Oracle Names  

Naming Methods

Net8 can resolve net service names using the following methods:

Naming Method   Description  

Host Naming  

Instead of net service names, clients use an alias that is mapped to a database's global database name during a connection. A host name is used to identify a database's global database name via an existing name resolution service. This name resolution service might be Domain Name Services (DNS), Network Information Service (NIS) or simply a centrally-maintained set of /etc/hosts files. Host naming allows users to connect to an Oracle server by simply providing the server computer's host name or host name alias. No client configuration is required to take advantage of this feature. This method is recommended for simple TCP/IP environments.

Additional Information: See "Configuring the Network with the Host Naming Method".  

Local Naming  

Resolves net service names to network addresses by using information configured and stored on each individual client. Local naming is most appropriate for simple distributed networks with a small number of services that change infrequently.

Additional Information: See "Configuring the Network with the Local Naming Method".  

Oracle Names  

Oracle Names stores names and addresses of all services on a network on an Oracle Names server. Connection requests are routed through an Oracle Names server, which resolves the net service name to a network address. The information is then returned to the client.

Additional Information: See "Configuring the Network with the Oracle Names Method".  

External Naming  

External naming refers to net service name resolution by using a supported third-party naming service.

Additional Information: See "Configuring the Network with the External Naming Method".  

For further information regarding choosing the right method, see "Resolving Net Service Names".

Configuration Files

Depending on the naming method you use, the following configuration files may be created or modified in $ORACLE_HOME/network/admin on UNIX and ORACLE_HOME\network\admin on Windows platforms:

Configuration File   Description  

LISTENER.ORA  

Located on the server, this file includes addresses of all listeners on a server, and various control parameters used by the listener.  

NAMES.ORA  

Located on the Oracle Names server, this file includes he location, domain information, and optional configuration parameters for each Names server.  

SQLNET.ORA  

Includes the names resolution method. This file resides on clients.  

TNSNAMES.ORA  

Located on the clients, this file includes a list of net service names and their listener address and service descriptions.  

See also the following:

Configuration of these files is described for each naming method in this chapter.

Configuring the Network with the Host Naming Method


Note:

This section describes configuration from a release 8.1 perspective. If you have an existing release 8.0 or release 7.x configuration, see Chapter 4, "Understanding Release 8.1 Installation and Net8 Products".  


Host naming can eliminate the need for service name lookup in the TNSNAMES.ORA configuration files in environments where simple connectivity is desired. However, host naming is not suitable for large or complex environments where advanced features such as connection pooling, external procedures, or heterogeneous services, which require additional connect information, are desired. In these cases, another naming method is recommended.

The host naming method is available for TCP/IP network environments only. When instances register with the listener, the global database name of the server, a name comprised of the database name and domain name, is registered. The global database name is mapped to host name and alias in an existing name resolution service. Client use the alias in their connect string to connect to the database.

Clients may connect to a server using the alias if:

To configure the host naming method, perform these tasks:

Step 1: Configure the Listener with the Global Database Name

Step 2: Configure HOSTNAME as the First Naming Method

Step 3: Set Up Host Name Resolution Environment

Step 1: Configure the Listener with the Global Database Name

The global database name must be registered with the listener. How this registration takes place depends upon the release of the database.

Oracle8i release 8.1

If the database can find the listener, information about the database is automatically registered with the listener, including the global database name. The listener is found if:

If the database cannot find the listener, the LISTENER.ORA file must be configured with the GLOBAL_DBNAME parameter, as described in "Oracle8i Release 8.0 or Previous" below.

Oracle8i Release 8.0 or Previous

If the database is an Oracle8i release 8.0 database or Oracle7 database, database information is registered with the listener through the LISTENER.ORA file. For these database, statically configured the SID_LIST_listener_name section to include the GLOBAL_DBNAME parameter, as shown below:

sid_list_listener=(sid_list=
(sid_desc=
 (global_dbname=sales.com)
 (sid_name=db1)
 (oracle_home=/u01/app/oracle/8.0.5)

)

See "Configuring a Listener with Service Information" for further information.

Step 2: Configure HOSTNAME as the First Naming Method

Configure host naming as the first method specified in the NAMES_DIRECTORY_PATH parameter in the SQLNET.ORA file. This parameter specifies the order of naming methods Net8 will use to reconcile services.

To specify local naming as the first naming method:

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Click the Profile icon.

  3. Choose Naming from the drop-down list box.

  4. Click the Methods tab.

  5. Choose TNSNAMES from the Available Methods list, then click ">".

    1. Select TNSNAMES in the Selected Methods list, then use the Promote button to move the selection to the top of the list:


    2. Choose Save Network Configuration from the File menu.

    3. Choose Exit from the File menu to exit the Net8 Assistant application.

      The SQLNET.ORA file should contain an entry that lists HOSTNAME first in the NAMES.DIRECTORY_PATH parameter:

      names.directory_path=(hostname, tnsnames)
      

Step 3: Set Up Host Name Resolution Environment

The global database name must be resolved through an IP address translation mechanism, such as DNS, NIS, or a centrally-maintained TCP/IP host file, /etc/hosts. The alias created for the global database name must match the global database name.

It is important to note that the domain portion of the global database name must match the network domain.

For example, if a global database name of SALES.COM for a database exists on a machine named SALES-PC, the entry in the /etc/hosts file would like the following.

#IP address of server     host name   alias
144.25.219.146            sales-pc    sales.com

Clients would use SALES.COM in their connect string, as described in "Connecting to a Database". If the client and server are in the same domain of COM, the client only needs to enter SALES in the connect string.

Configuring the Network with the Local Naming Method


Note:

This section describes configuration from a release 8.1 perspective. If you have an existing release 8.0 or release 7.x configuration, see Chapter 4, "Understanding Release 8.1 Installation and Net8 Products".  


With the local naming method, net service names are added to the TNSNAMES.ORA file. A net service name is mapped to a network address contained in a connect descriptor. A connect descriptor contains the location of the listener through a protocol address and the service name of the service to which to connect. Clients use this net service name when making a connection with an application.

An example of a TNSNAMES.ORA file's basic syntax for a net service name mapped to a connect descriptor is shown in Figure 6-1. DESCRIPTION contains the connect descriptor, ADDRESS is the listener address, and CONNECT_DATA contains the service name.

Figure 6-1 Net Service Name Usage in TNSNAMES.ORA

net_service_name= 
(description= 
  (address= (protocol_address_information))
  (connect_data= 
     (service_name=service_name) 
  ) 
) 

Each connect descriptor can contain one or more listener addresses, as shown in Figure 6-2:

Figure 6-2 Multiple Listener Addresses

net_service_name= 
(description= 
  (address= (protocol_address_information))
  (address= (protocol_address_information))
  (address= (protocol_address_information))
  (connect_data= 
     (service_name=service_name) 
  ) 
) 


Note:

If there was only one list of addresses, it was required to use an ADDRESS_LIST.  


Optional parameters, such as connect-time failover, client load balancing, and Oracle Connection Manager features, may be set for a list of addresses within a connect descriptor or all addresses among multiple connect descriptors.

For more information about these features, see Chapter 7, "Enabling Optional Net8 Features" and "Local Naming Parameters (TNSNAMES.ORA)".

Configuration During Installation

After a Custom installation on the client or server, the Net8 Configuration Assistant prompts you to configure a naming methods. If the local naming method is chosen, the Net8 Configuration Assistants prompts you to configure net service names in the TNSNAMES.ORA file. If you choose to use the Net8 Configuration Assistant to create net service names, ensure the listener protocol addresses match in the TNSNAMES.ORA and LISTENER.ORA files. Use the online help for instruction.

Configuration After Installation

Net service names can be added to the TNSNAMES.ORA file at any time. To configure the local naming method, perform these tasks:

Step 1: Configure Net Service Names

Step 2: Configure TNSNAMES as the First Naming Method

Step 3: Distribute Configuration

Step 4: Configure the Listener

Step 1: Configure Net Service Names

To configure with the local naming method, use either the Net8 Assistant or the Net8 Configuration Assistant on the server:


Note:

Net service names may also be created by running Net8 Easy Config. In the future this tool may not be available. Therefore, Oracle Corporation recommends using either the Net8 Configuration Assistant or the Net8 Assistant. To run Net8 Easy Config:

  • On UNIX, run netec at $ORACLE_HOME/bin.

  • On Windows platforms, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Configuration Assistant.

 

Net8 Assistant

To use the Net8 Assistant:

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Click the Net Service Names folder in the directory tree. If net service names exist, they display in the tree structure.

  3. Select Create from the Edit menu or click on the "+" button to create a new net service name. The Net Service Name Wizard starts.

  4. Enter any name in the Net Service Name field, then click Next:


    If you want to be explicit, the net service name may be qualified with the client's domain. The net service name is automatically domain qualified if the NAMES.DEFAULT_DOMAIN parameter in SQLNET.ORA is specified. For further information, see "Configuring Domains".

  5. Select the protocol the listener is configured to listen on (this protocol must also installed on the clients), then click Next:


  6. Enter the appropriate listener protocol address information for your chosen protocol in the fields, then click Next:


    See "Configuring Protocol Addresses" for further information about protocol addresses.

    When configuring the listener to listen on TCP/IP for typical Net8 clients, you should choose the default port or 1521. If you do not, you must configure the LOCAL_LISTENER parameter in the INITSID.ORA file and resolve the listener name through a naming method. For further information about configuring non-default port numbers in LISTENER.ORA, see "Configuring a Listener that Uses a Non-Default Port".

  7. If the destination service is release 8.1, click Oracle8i release 8.1, enter a service name in the Service Name field, then click Next:


    The service name is typically the global database name. See "Setting Service Names and Instance Names" for further information about the service name string to use.

    If destination service is prior to release 8.1, click Oracle8 Version 8.0 or Previous, enter a SID in the Database SID field, then click Next.

  8. Click Test to verify the net service name will work, then click Next. Testing assumes the database and listener are running. If they are not, see "Net8 Component Startup Overview" to start components, or click Next to disregard testing and continue to step 10.

    A successful test results in "The connect test was successful." message in the Connect Test dialog box:


    If the test was not successful:

    • Ensure the database and listener are running, then click Test.

    • Click Change Login to change the user name and password for the connection, then click Test.

  9. Click Close to dismiss the Connect Test dialog box.

  10. Click Finish to save your configuration and dismiss Net Service Names Wizard.

  11. Choose Save Network Configuration from the File menu.

  12. Choose Exit from the File menu to exit the Net8 Assistant.

See also the following:

Net8 Configuration Assistant

To use the Net8 Configuration Assistant:

  1. Start the Net8 Configuration Assistant:

    • On UNIX, run netca at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Configuration Assistant.

  2. Select Local Net8 Service Name configuration, then click Next.

  3. Click Create.

  4. Follow the prompts in the wizard and online help to complete net service name creation.


    Note:

    If you select the Oracle8i release 8.1 database or service option, the service name you enter is typically the global database name. See "Setting Service Names and Instance Names" for further information about the service name string to use.  


Step 2: Configure TNSNAMES as the First Naming Method

Configure local naming as the first method specified in the NAMES_DIRECTORY_PATH parameter in the SQLNET.ORA file. This parameter specifies the order of naming methods Net8 will use to reconcile services.

To specify local naming as the first naming method:

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Click the Profile icon.

  3. Choose Naming from the drop-down list box.

  4. Click the Methods tab.

  5. Choose TNSNAMES from the Available Methods list, then click ">".

    1. Select TNSNAMES in the Selected Methods list, then use the Promote button to move the selection to the top of the list:


    2. Choose Save Network Configuration from the File menu.

    3. Choose Exit from the File menu to exit the Net8 Assistant application.

      The SQLNET.ORA file should contain an entry that lists TNSNAMES first in the NAMES.DIRECTORY_PATH parameter:

      names.directory_path=(tnsnames, onames, hostname)
      

Step 3: Distribute Configuration

After one client is configured, it is best to simply copy over the TNSNAMES.ORA and SQLNET.ORA configuration files to the same location on the clients. This will ensure the files are consistent. Otherwise, you must use Net8 Assistant or Net8 Configuration Assistant on every client, introducing possible errors.

Step 4: Configure the Listener

Ensure the listener (located on the server) is configured to "listen on" on the same protocol and protocol address you configured for the net service name. By default, the listener should already be configured for your operating system's primary protocol, typically TCP/IP. For further information about configuring the listener, see "Configuring Protocol Addresses".

Configuring the Network with the Oracle Names Method


Note:

This section describes configuration from a release 8.1 perspective. If you have an existing release 8.0 or release 7.x configuration, see Chapter 4, "Understanding Release 8.1 Installation and Net8 Products".  


Oracle Names simplifies the setup and administration of global, client/server computing networks. Oracle Names makes network address and database link information available to all nodes throughout the network. Each database server's network address is identified with a simple service name. Client applications then can request a database connection with that name rather than a lengthy address. Oracle Names shields users and applications from changes made to the network infrastructure. It provides for centralized administration of network service names.

An Oracle Names server stores the following information:

Data   Description  

database global database names and addresses  

The Oracle Names server retrieves information about the database, including the global database name (database name and domain) and address, from the listener. The address is configured in the LISTENER.ORA file, and the global database name is registered during database startup or statically configured in the LISTENER.ORA file. You do not to register this information.  

other Oracle Names server names and addresses  

An Oracle Names server stores the names and addresses of all other Oracle Names servers in the same administrative region. If there is more than one administrative region in a network, the Oracle Names server will store the name and address of at least one Oracle Names server in the root administrative region and each of the immediate sub-regions. You do not need to register this information.  

net service names  

If you register net service name with the NAMESCTL control utility or the Net8 Assistant, an Oracle Names server stores them. An Oracle Names server also stores gateways to non-Oracle databases and Oracle RDB databases.  

global database link  

Database links allow a database to communicate with another database another. The name of a database link is the same as the global database name of the database to which the link points. Typically, only one database link should exist per database.

The following types of database links may be created:

  • You can create a private database link in a specific schema of a database. Only the owner of a private database link can use it.

  • You can create a public database link for a database. All users and in the database can use it.

  • You can create a global database link in Oracle Names server so anyone in the network can use it.

Because the Oracle Names retrieves the global database name from the listener, a global database link that is the global database name is automatically registered with the Oracle Names server. Therefore, you do not need to register this information.

User name and password credentials for the global database link may be registered with the Oracle Names server using the Net8 Assistatnt.These global database links may be supplemented with link qualifiers defined through the Net8 Assistant.

Global database links may be superseded with private and public database links created by individual users. For more information about private and public database links, see Oracle8i Distributed Database Systems.  

aliases  

An Oracle Names server stores aliases or alternative service names for any defined net service name, database service or global database link. Aliases may be registered with the Oracle Names server using either the NAMESCTL control utility or Net8 Assistant.  

Oracle Connection Managers  

An Oracle Names server stores the names and listening addresses of all Oracle Connection Managers on the network. You do not to register this information.  

Configuring Oracle Names involves the following tasks:

Step 1: Consider Oracle Names Options

Step 2: Install

Step 3: Create an Oracle Names Server

Step 4: Configure Clients and Database Servers To Use Oracle Names Servers

Step 5: Configure the Listener

Step 6: Register Data with the Oracle Names Server

Step 7: (Optional) Delegate Domains to Delegated Administrative Regions

Step 1: Consider Oracle Names Options

Prior to creating an Oracle Names server, you must decide whether:

For more assistance with the decisions above, see "Oracle Names Architecture".

Step 2: Install

Ensure the following is installed:

Step 3: Create an Oracle Names Server

How an Oracle Names server is created depends upon whether you want region data:

The cache files are stored in $ORACLE_HOME/network/names on UNIX platforms and ORACLE_HOME\network\names on Windows NT:

File   Description  

CKCFG.ORA  

Contains information about the Oracle Names server configuration, similar to the NAMES.ORA file.  

CKPCCH.ORA  

Contains client cache information, such as the connect string information.  

CKPREG.ORA  

Contains information about data stored in the Oracle Names server, which is similar to a TNSNAMES.ORA file.  

A default Oracle Names server named ONAMES_host is created during installation for a non-region database configuration. This Oracle Names is configured to listener on TCP/IP with port 1575. It contains basic configuration that does not include multiple domains or multiple regions. If you would like to use this Oracle Names server, skip this step and proceed to "Step 2: Discover Oracle Names Servers".

The following sections cover both modes:

Whichever method you choose, Oracle Corporation recommends you create more than one Oracle Names server for the network, in case one should go down.

Store Data in a Region Database

To store service data in an Oracle database, perform the following tasks:

Step 1: Configure the Database Server

To configure the database server:

  1. Start the database if it is not currently running. Otherwise, go to step 2.

    1. Connect to the database as INTERNAL:

      sql> CONNECT internal/password
      

      where password is ORACLE for the INTERNAL user account by default.

    2. Start the database:

      sql> STARTUP;
      
  2. Connect to the database as the SYSTEM user:

    sql> CONNECT system/password
    

    where password is MANAGER for the SYSTEM user account by default.

  3. Create a user account and password:

    sql> CREATE user user
      identified by password
      default tablespace users
      temporary tablespace temp;
    
    
  4. Run the NAMESINI.SQL script located in $ORACLE_HOME/network/admin on UNIX and ORACLE_HOME\network\admin\names on Windows NT platforms. This script creates the tables needed by Oracle Names to store information. Optionally, run NAMESUPG.SQL to define old tables.

    sql> CONNECT user/password
    sql> @oracle_home/network/admin/namesini.sql;
    
Step 2: Create Oracle Names Servers

For each machine where Oracle Names is installed and where you want an Oracle Names server, create an Oracle Names server from the Net8 Assistant.

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. From the Net8 Assistant, click the Oracle Names Servers folder.

  3. Choose Create from the Edit menu, or click on the "+" button to create a new Oracle Names server.

    The Names Wizard starts.

    The wizard guides you through the creation and configuration process, prompting for:

    • a unique Oracle Name Server name

    • a protocol address for the Oracle Names server

      If you choose TCP/IP, Oracle Corporation recommends using the default and officially registered port of 1575 for the Oracle Names server.

    • a choice to store information in a database or replicate information among Oracle Names servers

      (Click Use a region database.)

    • a protocol address for a database's listener

      If you choose TCP/IP, Oracle Corporation recommends using the default and officially registered port of 1521 for the listener.

    • database user ID, password, and service name or SID

    • whether or not this Oracle Names server is in the root administrative region

    If you specify this Oracle Names server is in the root administrative region, configuration completes.

    If you specify this Oracle Names server is not in the root administrative region, it assumed this Oracle Names server is in a delegated administrative region. The wizard then prompts you for the local administrative region's domain name and the address of an Oracle Names server in the root administrative region before completing.

    When the wizard completes, the following message appears:

    A Names Server, onames_server, has been created with default settings. Use the Configure Server section to modify the default configuration.

  4. Select Save Network Configuration from the File menu.

  5. Select Exit from the File menu to exit the Net8 Assistant application.

  6. Repeat steps 2-5 to create additional Oracle Names servers in a region. The Net8 Assistant does not support creation of multiple Oracle Names servers on one machine.

The Net8 Assistant creates a NAMES.ORA file with at least the following settings:

A NAMES.ORA file is shown below with annotations of content:

#Oracle Names server name. The name should include the name of the domain 
this Oracle Names server is in.
names.server_name=namesvr2.com

#Oracle Names server listening protocol address
names.addresses=
  (address=(protocol=tcp)(host=namesrv2-pc)(port=1575)) 
  [(address=...))]

#Database repository information
names.admin_region=
  (region=
    (description=
      (address=(protocol=tcp)(host=sales-pc)(port-1521)) 
      (connect_data=
        (service_name=sales.com)
    )
    (userid=system)
    (password=password)
    (name=local_region)
    (refresh=86400)
    (retry=60)
    (expire=600)
    )
#If an Oracle Names server is in a delegated administrative region, identify 
the address of an Oracle Names server in the root administrative region.
names.domain_hints=
  (address=(protocol=tcp)(host=namesrv1-pc)(port=1575)) 

    

# Specify the domain controlled by this region and the time to live (TTL). If this is the root administrative region, you must have NAME= (null) to identify the root domain properly. names.domains= (domain= (name=) (min_ttl=86400) )

See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.

Administering Multiple Domains

If you want the region to administer more than one domain, specify the additional domains in the NAMES.DOMAINS parameter with the Net8 Assistant:

  1. Double-click on the Oracle Names server folder.

  2. Select the Oracle Names server.

  3. Select Domains from the drop-down list box.

  4. Select the Domains tab.

  5. Enter the domain name in the Domain Name field.

  6. Enter the time-to-live information.

  7. Click Add.

  8. Select Save Network Configuration from the File menu.

  9. Repeat steps 1-8 to create additional for additional domains.

In the example below, NAMES.DOMAINS contains a listing for the root, COM, ORACLE.COM, and HQ.ORACLE.COM domains. All the domain precedent to HQ.ORACLE.COM must be defined in order to define HQ.ORACLE.COM.

names.domains=
 (domain_list=
  (domain=
    (name=)
    (min_ttl=86400)
  )
  (domain=
    (name=com)
    (min_ttl=86400)
  )
  (domain=
    (name=oracle.com)
    (min_ttl=86400)
  )
  (domain=
    (name=hq.oracle.com)
    (min_ttl=86400)
  )
 )
Step 3: Start the Oracle Names Server

Start the Oracle Names server using either the Net8 Assistant or the NAMESCTL control utility:

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Double-click on the Oracle Names server folder.

  2. Select the Oracle Names server.

  3. Select Manage Server from the drop-down list box.

  4. Select the Control tab.

  5. Click the Start radio button from the Server Operations field.

  6. Click Apply.

    The following message appears:

    Server started successfully.

    On Windows NT, a service called OracleHOME_NAMENamesONAMES_SERVER is created.

 

From the command line, enter:

namesctl

If the following error messages appear, ignore them.

NNL-00024: warning: no preferred names 
servers in SQLNET.ORA
NNL-00018: warning: could not contact 
default name server

namesctl> start

The START command of NAMESCTL loads the Oracle Names server into memory and tells it to begin executing. At startup, the Oracle Names server loads its configuration and data.

On Windows NT, this creates a service called OracleORACLE_HOMENamesonames_serverService.  

Store Data in Files

To store data in files and have it replicated between Oracle Names server during updates, performs these tasks:

Step 1: Create an Oracle Names Server

For each machine where Oracle Names is installed and where you want an Oracle Names server, create an Oracle Names server from the Net8 Assistant:

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. From the Net8 Assistant, click the Oracle Names Servers folder.

  3. Choose Create from the Edit menu, or click on the "+" button to create a new Oracle Names server.

    The Names Wizard starts.

    The wizard guides you through the creation and configuration process, prompting you for

    • a unique Oracle Name Server name

    • a listening protocol address for the Oracle Names server

      If you choose TCP/IP, Oracle Corporation recommends using the default and officially registered port of 1575 for the Oracle Names server.

    • a choice to store information in a database or replicate information among Oracle Names servers

      (Click Don't use a region database.)

    • to identify if this is the first Oracle Names server in the region

      If this is not the first Oracle Names server in the region, the wizard then prompts you to discover the other Oracle Names servers or to specify the address of another Oracle Names server in the region.

    • to identify if this Oracle Names server is in the root administrative region

    If you specify this Oracle Names server is in the root administrative region, configuration completes.

    If you specify this Oracle Names server is not in the root administrative region, it assumed this Oracle Names server is in a delegated administrative region. The wizard then prompts you for the local administrative region's domain name and the address of an Oracle Names server in the root administrative region before completing.

    When the wizard completes, the following message appears:

    A Names Server, onames_server, has been created with default settings. Use the Configure Server section to modify the default configuration.

  4. Select Save Network Configuration from the File menu.

  5. Repeat Steps 2-4 to create additional Oracle Names servers in a region. The Net8 Assistant does not support creation of multiple Oracle Names servers on one machine.

The Net8 Assistant creates a NAMES.ORA file with at least the following settings:

A NAMES.ORA file is shown below with annotations of content:

#Oracle Names server name. The name should include the name of the domain 
this Oracle Names server is in.
names.server_name=namesvr2.com

#Oracle Names server listening protocol address
  (address=(protocol=tcp)(host=namesrv2-pc)(port=1575)) 
  [(address=...))]


#If an Oracle Names server is in a delegated administrative region, identify 
the address of an Oracle Names server in the root administrative region.
names.domain_hints=
  (address=(protocol=tcp)(host=namesrv1-pc)(port=1575)) 


# Specify the domain controlled by this region and the time to live (TTL). 
If this is the root administrative region, you must have NAME= (null) to 
identify the root domain properly.
names.domains=
  (domain=
    (name=)
    (min_ttl=86400)
  )

See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.

Administering Multiple Domains

If you want the region to administer more than one domain, specify the additional domains in the NAMES.DOMAINS parameter with the Net8 Assistant:

  1. Double-click on the Oracle Names server folder.

  2. Select the Oracle Names server.

  3. Select Domains from the drop-down list box.

  4. Select the Domains tab.

  5. Enter the domain name in the Domain Name field.

  6. Enter the time-to-live information.

  7. Click Add.

  8. Select Save Network Configuration from the File menu.

  9. Repeat steps 1-8 to create additional for additional domains.

In the example below, NAMES.DOMAINS contains a listing for the root, COM, ORACLE.COM, and HQ.ORACLE.COM domains. All the domain precedent to HQ.ORACLE.COM must be defined in order to define HQ.ORACLE.COM.

names.domains=
 (domain_list=
  (domain=
    (name=)
    (min_ttl=86400)
  )
  (domain=
    (name=com)
    (min_ttl=86400)
  )
  (domain=
    (name=oracle.com)
    (min_ttl=86400)
  )
  (domain=
    (name=hq.oracle.com)
    (min_ttl=86400)
  )
 )
Step 2: Discover Oracle Names Servers

After all the Oracle Names servers are configured, have each Oracle Names, except the first Oracle Names server in the region, discover the other Oracle Names servers in a region.

See "Understanding Discovery" for a description of discovery.

On the machine where Oracle Names resides, use either the Net8 Assistant or the NAMESCTL control utility:

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Double-click on the Oracle Names Server folder.

  2. Select an Oracle Names server.

  3. Choose Manage Server from the drop-down list box.

  4. Click the Control tab.

  5. Click the Start option button from the Server Operations field.

  6. Click Apply.

    The following message appears:

    Server started successfully.

  7. Choose Discover Oracle Names Servers from the Command menu.

    This produces an .SDNS.ORA file in $ORACLE_HOME/network/names on UNIX or SDNS.ORA in ORACLE_HOME\network\names on Windows platforms. This file contains the names and addresses of the Oracle Names server(s). This file is read to find the addresses of Oracle Names servers.

The following message appears:"Discovered Oracle Names Server in the region. Please exit the tool and start again."

If an Oracle Names server does not respond, and you know the network address of a particular Oracle Names server, a dialog will prompt you for that address.

 
  1. Start the Oracle Names server:

         namesctl
         namesctl> start
    
  2. Discover the other Oracle Names servers:

         namesctl> reorder_ns
    

    This produces an .SDNS.ORA file in $ORACLE_HOME/network/names on UNIX or SDNS.ORA in ORACLE_HOME\network\names on Windows platforms. This file contains the names and addresses of the Oracle Names server(s). This file is read to find the addresses of Oracle Names servers.

    If an Oracle Names server cannot be found, and you know the network address of a particular Oracle Names server, enter the address at the prompt. For example:

         namesctl> reorder_ns  
    (address=(protocol=tcp)(host=mail-pc)(port=1575))
    
  3. Query another Oracle Names server to verify discovery.

         namesctl> query onames_server
    
 

Step 4: Configure Clients and Database Servers To Use Oracle Names Servers

To configure the client and database server machines:

  1. Optionally, create a preferred Oracle Names server list, as described in "Configuring Preferred Oracle Names Servers".

  2. Discover Oracle Names servers by creating an .SDNS.ORA file in $ORACLE_HOME\network\names on UNIX or SDNS.ORA file in ORACLE_HOME\network\names on Windows platforms. This file contains the order of names and addresses of the Oracle Names server(s) to contact. Client machines read this file to find the addresses of Oracle Names servers to contact. Use either the Net8 Assistant or the NAMESCTL utility.

    See "Understanding Discovery" for a description of discovery.

    Use the Net8 Assistant...   Use the control utility NAMESCTL...  
    1. Start the Net8 Assistant:

      -On UNIX, run netasst at $ORACLE_HOME/bin.

      -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

    2. Choose Discover Oracle Names Servers from the Command menu.

      This produces an .SDNS.ORA file in $ORACLE_HOME/network/names on UNIX or SDNS.ORA ORACLE_HOME\network\names on Windows platforms. This file contains the names and addresses of the Oracle Names server(s). This file is read to find the addresses of Oracle Names servers.

    The following message appears:"Discovered Oracle Names Server in the region. Please exit the tool and start again."

    If an Oracle Names server does not respond, and you know the network address of a particular Oracle Names server, a dialog will prompt you for the that address.

     

    Discover the other Oracle Names servers:

    namesctl
    namesctl> reorder_ns
    

    This produces an .SDNS.ORA file in $ORACLE_HOME/network/names on UNIX or SDNS.ORA in ORACLE_HOME\network\names on Windows platforms. This file contains the names and addresses of the Oracle Names server(s). This file is read to find the addresses of Oracle Names servers.

    If an Oracle Names server cannot be found, and you know the network address of a particular Oracle Names server, enter the address at the prompt. For example:

    namesctl> reorder_ns 
    (address=(protocol=tcp)(host=mail-pc)(port
    =1575))
    

     

  3. If you want Oracle Names to be the first method to reconcile net service names, set the NAMES_DIRECTORY_PATH parameter in the SQLNET.ORA file in the following manner:

    1. Click the Profile icon in the Net8 Assistant.

    2. Choose Naming from the drop-down list box.

    3. Click the Methods tab.

    4. Choose ONAMES from the Available Methods list, then click ">".

    5. Select ONAMES in the Selected Methods list, then use the Promote button to move the selection to the top of the list:


    6. Choose Save Network Configuration from the File menu.

    7. Choose Exit from the File menu to exit the Net8 Assistant application.

      The SQLNET.ORA file should contain an entry that lists ONAMES first in the NAMES.DIRECTORY_PATH parameter:

      names.directory_path=(onames, tnsnames, hostname)
      
  4. Additional features that you may configure for how a client will use Oracle Names include:

    Net8 Assistant Option   SQLNET.ORA Parameter   Description  

    Default Domain  

    NAMES.DEFAULT_DOMAIN  

    Indicates the domain name space from which the client will most often request an Oracle Names server. When set, this name will automatically be appended to any unqualified name in an Oracle Names request. Net8 sets the default domain to NULL by default.  

    Maximum Wait Each Attempt  

    NAMES.INITIAL_RETRY_
    TIMEOUT  

    Specifies how long a client will wait for a response from an Oracle Names server before reiterating the request to another Oracle Names server. Net8 will wait for 15 seconds by default.  

    Attempts Per Names Server  

    NAMES.REQUEST_RETRIES  

    Specifies the number of times a client will attempt to iterate through the list of Oracle Names servers before allowing the operation to fail. Net8 will attempt to iterate through the list of Oracle Names servers once before allowing the operation to fail by default.  

    Maximum Open Connections  

    NAMES.MAX_OPEN_
    CONNECTIONS  

    Specifies how many connections an Oracle Names client may have open at one time. Net8 allows a client to have 10 connections open at any one time by default. This default value should be sufficient for almost all situations.  

    Initial Preallocated Requests  

    NAMES.MESSAGE_POOL_
    START_SIZE  

    Allows you to pre-allocate an initial number of messages in a client's message pool. These messages may be used for future requests to Oracle Names servers. Net8 allocates 10 messages in the pool by default. This default value should be sufficient for almost all situations.  

    To add or configure these features:

    1. Click the Profile icon in the Net8 Assistant.

    2. Choose Naming from the drop-down list box.

    3. Click the Oracle Names tab.

    4. Enter data for the options indicated in the table on the previous page.

    5. Choose Save Network Configuration from the File menu.

    6. Choose Exit from the File menu to exit the Net8 Assistant application.

Step 5: Configure the Listener

Configure the listener with listening database protocol addresses if you are not using your operating system's primary protocol. For further information about configuring the listener, see "Configuring Protocol Addresses".

Additionally, set USE_PLUG_AND_PLAY_listener_name=ON in the LISTENER.ORA file with the Net8 Assistant. This permits the listener to register database information, such as the service name, SID, and global database name, with Oracle Names servers:

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Double-click on the Listeners folder.

  3. Click on a listener.

    =

  4. Choose General Parameter from the drop-down list box.

  5. Click Register Service with Oracle Names.

  6. Select Save Network Configuration from the File menu.

  7. Choose Exit from the File menu to exit the Net8 Assistant application.

Step 6: Register Data with the Oracle Names Server

As described in the table in "Configuring the Network with the Oracle Names Method", Oracle Names server store many kinds of information, including as database locations, Oracle Names server locations, net service names, aliases, global database links, and Oracle Connection Manager. Some of this information is automatically registered with the Oracle Names server because the database registers information with the listener. If you would like to store the following kinds of information, you must register it using either the Net8 Assistant or the NAMESCTL control utility:

Registration only needs to occur with one Oracle Names server in an administrative region. The other Oracle Names servers will see the information if data is stored in a region database, or the information will be propagated to other Oracle Names if you chose not to use a region database.

After registering these kinds of information, you should query them, as described in "Testing Network Objects Using NAMESCTL or the Net8 Assistant".

Net Service Names

Oracle Corporation advises creating a net service name for each service. If a net service name is not created, a user trying to connect will have to pass the global database name to make a connection. Rather than provide this information to your end users, create a net service name for the service.

Use either the Net8 Assistant or the NAMESCTL control utility:

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Start the Net8 Assistant:

    -On UNIX, run netasst at $ORACLE_HOME/bin.

    -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Double-click on the Oracle Names server folder.

  3. Select an Oracle Names server.

  4. Choose Manage Data from the drop-down list box.

  5. Click the Net Service Names tab.

  6. Select Add.

  7. Enter an easy-to-remember alias in the Service Name field.

  8. Choose a protocol and enter the listener address.

    Additional Information: See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.

  9. Enter the service name for the database, and choose the session type.

  10. Click Execute.

  11. Select Save Network Configuration from the File menu.

  12. Select Exit from the File menu to exit the Net8 Assistant application.

 

Create and register a net service name with the Oracle Names server:

namesctl
namesctl> register net_service_name -D address_data 

For example, to register a net service name of SALES with a default TCP/IP listening address, enter:

register sales -D 
(description=(address=(protocol-tcp)(host=sales-pc)(
port=1521)))

Additional Information: See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.  

If you have been using local naming as your configuration method and want to migrate to an Oracle Names configuration, the net service name information used in the TNSNAMES.ORA file can uploaded to an Oracle Names server. To load information from a local naming configuration file into an Oracle Names server, use either the Net8 Assistant or the NAMESCTL control utility:

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Select an Oracle Names server.

  2. Select Manage Data from the drop-down list box.

  3. Select Load.

  4. Enter the path for your current master local naming configuration file in the File field.

  5. Click Execute.

  6. Select Save Network Configuration from the File menu.

  7. Select Exit from the File menu to exit the Net8 Assistant application.

 

From the command line, enter:

namesctl
namesctl> load_tnsnames file_name
 

Global Database Links Credentials and Database Qualifiers

Oracle Corporation recommends creating one global database link per database. A global database link that is the global database name is automatically registered with the Oracle Names server, such as SALES.COM.

For example, a connection to a remote database with the global database link would be:

sql> CONNECT @sales.com

Therefore, you do not need to register this information unless you want to enter user name and password credentials for it.

To register a global database link, use either the Net8 Assistant or the NAMESCTL control utility. Because the NAMESCTL utility is limited in global database link registration, Oracle Corporation recommends you use the Net8 Assistant.

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Start the Net8 Assistant:

    -On UNIX, run netasst at $ORACLE_HOME/bin.

    -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Double-click on the Oracle Names server folder.

  3. Select an Oracle Names server.

  4. Choose Manage Data from the drop-down list box.

  5. Click the DB Links tab.

  6. Select Add.

  7. Enter the global database link in the DB Link Name field.

    NOTE: If the GLOBAL_NAMES parameter has been set to TRUE in the INITSID.ORA file, the name entered must be the global database name.

  8. Enter valid user name and password credentials for the database in the User and Password fields.

  9. Click Execute.

  10. If you want to use a link qualifier, see "Adding Link Qualifiers".

  11. Select Save Network Configuration from the File menu.

  12. Select Exit from the File menu to exit the Net8 Assistant application.

 

Create and register a global database link with the Oracle Names server:

namesctl
namesctl> register dblink-d address_data 

For example, to register a global database link of SALES.COM with a default TCP/IP listening address, enter:

register sales.com -d 
(description=(address=(protocol-tcp)(host=sale
s-pc)(port=1521)))

Additional Information: See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.

The NAMESCTL utility will not permit user name and password credentials.  

While one global database link per database is recommend, there is no limit on the number of link qualifiers that may be added. Link qualifiers are appended to global database link to provide alternate settings for the database user name and password credentials. For example, a link qualifier of RDBMS.OMD can be appended to SALES.COM. A connection to a remote database with the global database link and link qualifier would be:

sql> CONNECT @sales.com@emp

Adding Link Qualifiers

Link qualifiers are primarily for older Oracle database environments where multiple database links are used. Rather than use multiple database links, multiple link qualifiers can be created for a database link.

To register a global link qualifier for a global database link, use the Net8 Assistant. The NAMESCTL utility does not support creation of link qualifiers.

  1. Follows steps 1-8 on the procedure on the previous page.

  2. Click DB Qualifiers.

  3. Click Create Qualifier.

    The Database Qualifier dialog box appears:

  4. Enter a name for the link qualifier, and valid user name and password credentials, then click OK.

    The link qualifier is added to the DB Qualifiers list box:


  5. Repeat steps 3-5 for each link qualifier you want to add.

  6. Click Execute.

  7. Select Save Network Configuration from the File menu.

  8. Select Exit from the File menu to exit the Net8 Assistant application.

To verify a global database link and link qualifier is working correctly:

  1. Connect to the remote database:

    sql> CONNECT user_name/password@db_link;
    sql> CONNECT user_name/password@db_link@link_qualifier;
    
    

    For example:

    sql> CONNECT scott/tiger@sales.com;
    sql> CONNECT scott/tiger@sales.com@emp;
    
    
  2. Perform a SELECT statement on a table the user is authorized for:

    sql> SELECT * from  table@db_link;
    sql> SELECT * from  table@db_link@link_qualifier;
    
    

    For example:

    sql> SELECT * from EMP@sales.com;
    sql> SELECT * from EMP@sales.com@emp;
    
    

For more information about database links, see Oracle8i Distributed Database Systems.

Aliases

An alias can be used for type of item stored in the Oracle Names server, such as a Oracle Names server, net service name, or global database link.

To register a global database link, use either the Net8 Assistant or the NAMESCTL control utility.

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Start the Net8 Assistant:

    -On UNIX, run netasst at $ORACLE_HOME/bin.

    -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Double-click on the Oracle Names server folder.

  3. Select an Oracle Names server in the administrative region.

  4. Choose Manage Data from the drop-down list box.

  5. Click the Aliases tab.

  6. Select Add.

  7. Specify the sub-domain in the Domain Name field.

  8. Enter the Oracle Names server name in the Name Server Name field and

  9. Click Execute.

  10. Select Save Network Configuration from the File menu.

  11. Select Exit from the File menu to exit the Net8 Assistant application.

 

Create and register an alias with the Oracle Names server:

namesctl
namesctl> register alias/i> -d address_data 

For example, to register a net service name of SALES with a default TCP/IP listening address, enter:

register sales -d 
(description=(address=(protocol-tcp)(host=sale
s-pc)(port=1521)))

Additional Information: See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.  

Step 7: (Optional) Delegate Domains to Delegated Administrative Regions

If delegated administrative regions are configured, the upper-level administrative region must delegate sub-domains to the delegated administrative regions. Otherwise, the Oracle Names servers in the upper-level administrative region will assume authority over all sub-domains.

Once a domain is delegated, the Oracle Names servers in the current region will forward subsequent operations to the sub-region where the domain is administered by Oracle Names servers.

To delegate a domain, use either the Net8 Assistant or the NAMESCTL control utility.

Use the Net8 Assistant...   Use the control utility NAMESCTL...  
  1. Start the Net8 Assistant:

    -On UNIX, run netasst at $ORACLE_HOME/bin.

    -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Double-click on the Oracle Names server folder.

  3. Select an Oracle Names server in the upper-level region.

  4. Choose Manage Data from the drop-down list box.

  5. Click the Topology tab.

  6. Select Delegate Domain.

  7. Enter the name of the sub-domain in the Domain Name field.

  8. Enter the Oracle Names server that serves the domain in the Names Server Name field, and the listening address for the Oracle Names server.

    Additional Information: See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.

  9. Click Execute.

  10. Select Save Network Configuration from the File menu.

  11. Select Exit from the File menu to exit the Net8 Assistant application.

 

Create and register an alias with the Oracle Names server:

namesctl
namesctl> delegate_domain domain_name onames_server 
[(description=(address_list=] (address= ...)[))]

Additional Information: See "Configuring Protocol Addresses" for more information about protocol syntax needed for address information.


For example, to delegate domain ACME.COM serviced by NAMESRV3.ACME.COM, enter:

delegate_domain acme.com namesrv3.acme.com 
(address=(protocol-tcp)(host=namesrv3-pc)(port
=1575)))

 

Configuring the Network with