Skip Headers

Oracle9i Net Services Administrator's Guide
Release 2 (9.2)

Part Number A96580-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page Go to next page
View PDF

9
Configuring Naming Methods

This chapter describes how to configure connectivity information for client connections to the database server.

This chapter contains these topics:

Naming Method Configuration Overview

To connect to a service, clients use a connect identifier in the connect string to connect to a service. The connect identifier can be a connect descriptor or a simple name that maps to a connect descriptor. The connect descriptor contains:

A simple name is resolved to a connect descriptor by a naming method. Naming method configuration consists of the following steps:

  1. Select a naming method.
  2. Map connect descriptors to simple names.
  3. Configure clients to use the naming method.

About Connect Descriptors

A connect descriptor is comprised of one or more protocol addresses of the listener and connect data information for the destination service.

The following example shows a connect descriptor mapped to simple name called sales:

sales=
 (DESCRIPTION= 
  (ADDRESS= (PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
  (CONNECT_DATA= 
     (SERVICE_NAME=sales.us.acme.com)))

The ADDRESS section contains the listener protocol address, and the CONNECT_DATA section contains the destination service information. In this example, the destination service is a database service named sales.us.acme.com.

When creating a connect descriptor to an Oracle9i or Oracle8i database service, you must identify the service with the SERVICE_NAME parameter. Optionally, you can identify an instance with the INSTANCE_NAME parameter, as shown in the following:

sales=
 (DESCRIPTION= 
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) 
  (CONNECT_DATA= 
     (SERVICE_NAME=sales.us.acme.com)
     (INSTANCE_NAME=sales)))

The values for these parameters come from the SERVICE_NAMES (with an S) and INSTANCE_NAME parameters in the initialization parameter file. The SERVICE_NAMES parameter in the initialization parameter file is typically the global database name, a name comprising the database name and domain name, entered during installation or database creation. For example, sales.us.acme.com has a database name of sales and a domain of us.acme.com. The INSTANCE_NAME parameter in the initialization parameter file defaults to the SID entered during installation or database creation.

See Also:

"Database Service and Database Instance Identification"

When creating a connect a descriptor for an Oracle release 8.0 or version 7 database, you identify the service with the SID parameter. The following example shows a connect descriptor for an Oracle release 8.0 database with a SID of sales:

sales=
 (DESCRIPTION= 
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) 
  (CONNECT_DATA= 
     (SID=sales)))

Naming Methods

Table 9-1 describes the naming methods that Oracle Net supports.

Table 9-1  Naming Methods
Naming Method Description

Local Naming

Resolves a net service name stored in a tnsnames.ora file stored on a client

Local naming is most appropriate for simple distributed networks with a small number of services that change infrequently.

See Also: "Configuring the Local Naming Method"

Directory Naming

Resolves a database service name, net service name, or net service alias stored in a centralized LDAP-compliant directory server

See Also: "Configuring the Directory Naming Method"

Oracle Names

Resolves a database or alias objects stored in an Oracle Names server

See Also: "Configuring the Oracle Names Method"

Note: In future releases, Oracle Names will not be supported as a centralized naming method.

Host Naming

Enables users to connect to an Oracle server by using a host name alias. Host names are mapped to a connect descriptor in an existing names resolution service or a centrally-maintained set of /etc/hosts files.

No client configuration is required to take advantage of this feature. This method is recommended for simple TCP/IP environments.

See Also: "Configuring the Host Naming Method"

External Naming

Resolves service information stored in an a third-party naming service

See Also: "Configuring External Naming Methods"

See Also:

"Naming"

Configuring the Local Naming Method

The local naming method adds net service names to the tnsnames.ora file. Each net service name maps to a connect descriptor. The example a net service name mapped to a connect descriptor:

sales=
(DESCRIPTION= 
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
  (CONNECT_DATA= 
     (SERVICE_NAME=sales.us.acme.com)))

In this example, the net service name sales is mapped to the connect descriptor contained in DESCRIPTION. DESCRIPTION contains the protocol address and identifies the destination database service.

You can configure local naming during or after installation, as described in these topics:

Configuring the tnsnames.ora File During Installation

Oracle Net Configuration Assistant enables you to configure net service names for clients. Oracle Universal Installer launches Oracle Net Configuration Assistant after software installation. The configuration varies depending on the installation mode.

Typical or Minimal Installation

Oracle Net Configuration Assistant prompts you to configure net service names in the tnsnames.ora file to connect to an Oracle database service.

Custom Installation

Oracle Net Configuration Assistant prompts you to select naming methods to use. If Local is selected, then Oracle Net Configuration Assistant prompts you to configure net service names in a tnsnames.ora file to connect to an Oracle database service.

Configuring the tnsnames.ora File After Installation

You can add net service names to the tnsnames.ora file at any time. To configure the local naming method, perform the following tasks:

Task 1: Configure Net Service Names

Task 2: Configure TNSNAMES as the First Naming Method

Task 3: Distribute Configuration

Task 4: Configure the Listener

Task 5: Connect to the Database

Note:

The underlying network connection must be operational before attempting to configure connectivity with Oracle Net.

Task 1: Configure Net Service Names

To configure with the local naming method, use either of the following tools:

Oracle Net Manager

To configure net service names in the tnsnames.ora file with Oracle Net Manager:

  1. Start Oracle Net Manager.

    See Also:

    "Starting Oracle Net Manager"

  2. In the navigator pane, expand Local > Service Naming.
  3. Click plus (+) from the toolbar, or choose Edit > Create from the menu bar.

    The Welcome page of the Net Service Name Wizard appears.

  4. Enter any name in the Net Service Name field.

    You can qualify the net service name with the client's domain. The net service name is automatically domain qualified if the sqlnet.ora file parameter NAMES.DEFAULT_DOMAIN is set.

    See Also:

    "Configuring a Default Domain for Clients"

  5. Click Next.

    The Protocol page appears.

  6. Select the protocol on which the listener is configured to listen. Note that this protocol must also be installed on the client.
  7. Click Next.

    The Protocol Settings page appears.

  8. Enter the appropriate parameter information for the selected protocol in the fields provided.

    See Also:

    Oracle9i Net Services Reference Guide for protocol parameter settings



  9. Click Next.

    The Service page appears.

  10. Select a release, enter a destination service, and optionally, select a database connection type.

    Text description of netwiz4.gif follows.

    Text description of the illustration netwiz4.gif

    If the destination service is Oracle9i or Oracle8i database, then select Oracle8i or later, and enter a service name in the Service Name field. If destination service is an Oracle release 8.0 database, then select Oracle8 or Previous, and enter an Oracle System Identifier for an instance in the Database SID field.

    See Also:

    "About Connect Descriptors" for further information about the service name string to use

    Oracle Corporation recommends that you use the default setting of Database Default for the connection type. If shared server is configured in the initialization parameter file, you can select Dedicated Server to force the listener to spawn a dedicated server, bypassing shared server configuration. If shared server is configured in the initialization parameter file and you want to guarantee the connection always uses shared server, select Shared Server.

    See Also:

    Chapter 14, "Configuring Shared Server" for further information about shared server configuration

  11. Click Next.

    The Test page appears.

  12. Click Test to verify that the net service name works, or click Finish to dismiss the Net Service Name Wizard.

    If you click Test, then Oracle Net connects to the database server by using the connect descriptor information you configured. Therefore, the database and the listener must be running for a successful test. If they are not, see "Starting Oracle Net Services Components" to start components before testing. During testing, a Connection Test dialog box appears, providing status and test results. A successful test results in the following message:

    The connection test was successful.
    
    

    If the test was successful, click Close to dismiss the Connect Test dialog box, and proceed to Step 13.

    If the test was not successful:

    1. Ensure that the database and listener are running, and then click Test.
    2. Click Change Login to change the username and password for the connection, and then click Test.
  13. Click Finish to dismiss the Net Service Name Wizard.
  14. Choose File > Save Network Configuration.

    See Also:
Oracle Net Configuration Assistant

To configure net service names in the tnsnames.ora file with Oracle Net Configuration Assistant:

  1. Start Oracle Net Configuration Assistant.

    See Also:

    "Oracle Net Configuration Assistant"

    The Welcome page appears.

  2. Select Local Net Service Name Configuration, and then click Next.

    The Net Service Name Configuration page appears.

  3. Click Add, and then click Next.

    The Net Service Name Configuration, Database Version page appears.

  4. If the destination service is an Oracle9i or Oracle8i database, then select Oracle8i or later database or service. If destination service is an Oracle8 release 8.0 database, then select Oracle8 release 8.0 database or service.
  5. Click Next.
  6. Follow the prompts in the wizard and online help to complete net service name creation.

Task 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 Oracle Net uses to resolve connect identifiers to connect descriptors.

To specify local naming as the first naming method:

  1. Start Oracle Net Manager.

    See Also:

    "Starting Oracle Net Manager"

  2. In the navigator pane, expand Local > Profile.
  3. From the list in the right pane, select Naming.
  4. Click the Methods tab.
  5. From the Available Methods list, select TNSNAMES, and then click the right-arrow button.
  6. From the Selected Methods list, select TNSNAMES, and then use the Promote button to move the selection to the top of the list.
  7. Choose File > Save Network Configuration.

    The sqlnet.ora file updates with the NAMES.DIRECTORY_PATH parameter, listing tnsnames first:

    NAMES.DIRECTORY_PATH=(tnsnames, onames, hostname)
    

Task 3: Distribute Configuration

After one client is configured, it is best simply to copy the tnsnames.ora and sqlnet.ora configuration files to the same location on the other clients. This ensures that the files are consistent. Alternatively, you can use Oracle Net Manager or Oracle Net Configuration Assistant on every client.

Task 4: Configure the Listener

Ensure that the listener (located on the server) is configured to "listen on" the same protocol address you configured for the net service name. By default, the listener should already be configured for the TCP/IP protocol on port 1521.

See Also:

Chapter 12, "Configuring and Administering the Listener" for listener configuration details

Task 5: Connect to the Database

Clients can connect to the database using the following syntax:

CONNECT username/password@net_service_name

Configuring the Directory Naming Method

With the directory naming method, connect identifiers are mapped to connect descriptors contained in an LDAP-compliant directory server, including Oracle Internet Directory and Microsoft Active Directory. A directory provides central administration of database services and net service names, making it easier to add or relocate services.

A database service entry is created with Database Configuration Assistant during installation; net service name and net service alias entries can be created with Oracle Net Manager. To modify Oracle Net attributes of a database service entry and the net service name entries, use Oracle Net Manager.

Clients configured to access the directory can use these entries to connect to the database.

This section contains these topics:

Directory Naming Method Configuration Steps

To configure the directory naming method, perform the following tasks:

Task 1: Configure Directory Usage on Server and Clients

Task 2: Create Net Service Name Entries (Optional)

Task 3: Configure LDAP as the First Naming Method

Task 4: Configure the Listener

Task 5: Connect to the Database

Task 1: Configure Directory Usage on Server and Clients

Before a directory naming entry can be created to a directory, you must complete directory usage configuration with the Select the directory server you want to use, and configure the directory server for Oracle usage option in Oracle Net Configuration Assistant. Likewise, before a directory naming entry can be looked up by a client, you must complete directory usage configuration with the Select the directory server you want to use option in Oracle Net Configuration Assistant. You can configure directory server usage during or after installation.

See Also:

Chapter 8, "Setting Up Directory Server Usage" for further information about configuring directory server usage

Task 2: Create Net Service Name Entries (Optional)


Notes:

You can configure clients to use a net service name rather than the database service entry created by Database Configuration Assistant.

To create a net service name in a directory server:

  1. Start Oracle Net Manager on a computer that was used to configure directory usage for Oracle usage:

    See Also:

    "Configuring Directory Usage After Installation" for instructions on using the Select the directory server you want to use, and configure the directory server for Oracle usage option

    "Starting Oracle Net Manager" for instructions on using Oracle Net Manager

  2. In the navigator pane, expand Directory > Service Naming.
  3. Click plus (+) from the toolbar, or choose Edit > Create from the menu bar.

    The Welcome page of the Net Service Name Wizard appears.

  4. Enter any name in the Net Service Name field.
  5. Click Next.

    The Protocol page appears.

  6. Select the protocol on which the listener is configured to listen. Note that this protocol must also be installed on the client.
  7. Click Next.

    The Protocol Settings page appears.

  8. Enter the appropriate parameter information for the selected protocol in the fields provided.

    See Also:

    Oracle9i Net Services Reference Guide for protocol parameter settings



  9. Click Next.

    The Service page appears.

  10. Select a release, enter a destination service, and optionally, select a database connection type.

    Text description of netwiz4.gif follows.

    Text description of the illustration netwiz4.gif

    If the destination service is Oracle9i or Oracle8i database, then select Oracle8i or later, and enter a service name in the Service Name field. If destination service is an Oracle release 8.0 database, then select Oracle8 or Previous, and enter an Oracle System Identifier for an instance in the Database SID field.

    See Also:

    "About Connect Descriptors" for further information about the service name string to use

    Oracle Corporation recommends that you use the default setting of Database Default for the connection type. If shared server is configured in the initialization parameter file, you can select Dedicated Server to force the listener to spawn a dedicated server, bypassing shared server configuration. If shared server is configured in the initialization parameter file and you want to guarantee the connection always uses shared server, select Shared Server.

    See Also:

    Chapter 14, "Configuring Shared Server" for further information about shared server configuration

  11. Click Next.

    The Test page appears.

  12. Click Test to verify that the net service name works, or click Finish to dismiss the Net Service Name Wizard.

    If you click Test, then Oracle Net connects to the database server by using the connect descriptor information you configured. Therefore, the database and the listener must be running for a successful test. If they are not, see "Starting Oracle Net Services Components" to start components before testing. During testing, a Connection Test dialog box appears, providing status and test results. A successful test results in the following message:

    The connection test was successful.
    
    

    If the test was successful, click Close to dismiss the Connect Test dialog box, and proceed to Step 12.

    If the test was not successful:

    1. Ensure that the database and listener are running, and then click Test.
    2. Click Change Login to change the username and password for the connection, and then click Test.
  13. Click Finish to dismiss the Net Service Name Wizard.

    See Also:

Task 3: Configure LDAP as the First Naming Method

Configure directory 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 Oracle Net uses to resolve connect identifiers to connect descriptors.

To specify directory naming as the first naming method:

  1. Start Oracle Net Manager.

    See Also:

    "Starting Oracle Net Manager"

  2. In the navigator pane, expand Local > Profile.
  3. From the list in the right pane, select Naming.
  4. Click the Methods tab.
  5. From the Available Methods list, select LDAP, and then click the right-arrow button.
  6. From the Selected Methods list, select LDAP, and then use the Promote button to move the selection to the top of the list.
  7. Choose File > Save Network Configuration.

    The sqlnet.ora file updates with the NAMES.DIRECTORY_PATH parameter, listing ldap first:

    NAMES.DIRECTORY_PATH=(ldap, tnsnames, onames, hostname)
    

Task 4: Configure the Listener

Ensure that the listener (located on the server) is configured to listen on the same protocol address configured for the net service name. By default, the listener is configured to listen on the TCP/IP protocol, port 1521.

See Also:

Chapter 12, "Configuring and Administering the Listener" for listener configuration details

Task 5: Connect to the Database

Clients that are configured with a default directory entry that matches the directory location of the database service or net service name can connect to the database using the following syntax:

CONNECT username/password@connect_identifier

Clients that are configured with a default directory entry that does not match the entry's directory location cannot use the connect identifier in the connect string. Instead, these connections require the entry's distinguished name or its absolute name.

See Also:

Modifying Connectivity Information for Database Service Entries


Note:

When database registration with the directory completes, Database Configuration Assistant creates a database service entry in the directory. By default, this entry contains network route information that includes the location of the listener through a protocol address. You can re-create this information, if it has been removed, or modify the existing network route information.

To create or modify network route information for a database service:

  1. Start Oracle Net Manager on a computer that was used to configure directory usage for Oracle usage:

    See Also:

    "Configuring Directory Usage After Installation" for instructions on using the Select the directory server you want to use, and configure the directory server for Oracle usage option

    "Starting Oracle Net Manager" for instructions on using Oracle Net Manager

  2. In the navigator pane, expand Directory > Service Naming.
  3. Select the database service. The right pane displays the current destination service name.
  4. In the Address Configuration box, click plus (+).

    A new Address tab appears.

  5. Select a protocol, and then enter the appropriate parameter information for the selected protocol in the fields provided.

    See Also:

    Oracle9i Net Services Reference Guide for protocol parameter settings

  6. In the right pane, click Apply.

Creating Net Service Aliases


Notes:
  • Only users that are members of either the OracleNetAdmins or OracleContextAdmins group can create or modify net service alias entries in a directory. To add or remove users from the OracleNetAdmins group, see "Adding Users To the OracleNetAdmins Group".
  • To create or access net service aliases, ensure that the Oracle home is upgraded to 9.2.
  • You can export existing alias objects from an Oracle Names server. See Chapter 10, "Exporting Naming Data to a Directory Server".
  • Net service aliases are not supported using Microsoft Active Directory.

Net service aliases in a directory server enable clients to refer to a database service or a net service name by an alternative name. For example, a net service alias of salesalias can be created for a net service name of sales. When salesalias is used to connect to a database, as in CONNECT scott/tiger@salesalias, it will actually resolve to and use the connect descriptor information for sales.

There are two main uses of net service aliases:

To create a net service alias:

  1. Start Oracle Net Manager on a computer that was used to configure directory usage for Oracle usage:

    See Also:

    "Configuring Directory Usage After Installation" for instructions on using the Select the directory server you want to use, and configure the directory server for Oracle usage option

    "Starting Oracle Net Manager" for instructions on using Oracle Net Manager

  2. In the navigator pane, expand Directory > Service Naming > Aliases.
  3. Click plus (+) from the toolbar, or choose Edit > Create from the menu bar.

    The Create Alias dialog box appears.

    Text description of alias1.gif follows.

    Text description of the illustration alias1.gif

  4. In the Net Service Alias field, enter a name for the alias.
  5. In the Net Service Name or Database Service box, enter the information in the fields described in Table 9-2.
    Table 9-2  Net Service Name/Database Service Box Fields
    Field Description

    Oracle Context

    Specify the Oracle Context of the database service or net service name by selecting one from the list or entering one in the field.

    Name

    Specify the DN of the database service or net service name by selecting one from the list or entering one in the field.

  6. Click Create.

    The Aliases folder updates with the created net service alias.

    Text description of alias2.gif follows.

    Text description of the illustration alias2.gif

Configuring the Oracle Names Method


Note:

In future releases, Oracle Names will not be supported as a centralized naming method. Because no new enhancements are being added to Oracle Names, consider using directory naming or migrating an existing Oracle Names configuration to directory naming, as described in Chapter 10, "Exporting Naming Data to a Directory Server". The material presented here is primarily for reference to enable you to maintain your current Oracle Names environment.


See Also:

Oracle9i Database Migration for the procedures for upgrading previous release of Oracle Names to 9i

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 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 to the network infrastructure. It provides for centralized administration of network service names.

Configuring Oracle Names involves these tasks:

Task 1: Consider Oracle Names Options

Task 2: Install Necessary Components

Task 3: Create an Oracle Names Server

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

Task 5: (Optional) Configure Client Caches

Task 6: Configure the Listener

Task 7: Register Data with the Oracle Names Server

Task 8: Delegate Domains to Delegated Administrative Regions

Task 9: Specify Domain Hints to Forward Requests to Remote Oracle Names Servers

Task 10: Connect to the Database

Task 1: Consider Oracle Names Options

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

Task 2: Install Necessary Components

Ensure that the following are installed:

Task 3: Create an Oracle Names Server

How an Oracle Names server is created depends upon how you want region data stored. You can have the data:

By default, the checkpoint files are stored in $ORACLE_HOME/network/names on UNIX operating systems, and ORACLE_HOME\network\names on Windows NT. Table 9-3 describes the checkpoint files.

Table 9-3  Oracle Names Checkpoint Files
Checkpoint File Name Description

ckpcfg.ora

Contains a backup copy of the configuration parameters stored in the ONRS_CONFIG table in the region database

ckpcch.ora

Contains all current non-authoritative data that has been retrieved and cached from remote regions and has not expired yet

ckptop.ora and ckpdom.ora

These files contain all authoritative data for the region. The ckptop.ora file defines the domains in the administrative region and the Oracle Names servers authoritative for each domain. The ckdom.ora file contains the authoritative data for each domain.

If the Oracle Names server uses a region database, then these files serve as a copy of the region data in the tables as of the last reload. This data is used when the Oracle Names server starts if the database is inaccessible.

If the Oracle Names server is not using the database, these files are its only persistent storage and are loaded by the Oracle Names server at startup. The Oracle Names server considers the data in these file to be current if there are no other Oracle Names servers in the region. The files are kept current as of the last update to the region.

The following sections cover both modes, as well as a default Oracle Names server that requires no configuration:

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

Default Oracle Names Server

An Oracle Names server can run without any configuration. Its name defaults to ONAMES_host if its name is configured in the names.ora file. The protocol address defaults to TCP/IP, port 1575 on the local host.

If the NAMES.DOMAINS parameter is not configured in the names.ora file, the Oracle Names server assumes authority for the root domain.

If you would like to use this Oracle Names server, proceed to "Task 2: Discover Oracle Names Servers".

Create Tables in a Database

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

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

    See Also:

    "Task 4: Start the Database"

  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 that can create tables.
    1. Create user. In the following example syntax, the default tablespace is users and the temporary tablespace is temp:
      CREATE USER user
      IDENTIFIED BY password
      DEFAULT TABLESPACE users
      TEMPORARY TABLESPACE temp;
      
      
      
    2. Grant the user the ability to connect to the database:
      GRANT CREATE SESSION TO user;
       
      
    3. Grant the user the ability to update tables in the users tablespace:
      GRANT RESOURCE users TO user; 
      
      
      
    4. Grant the ability to create synonyms in the user's schema:
      GRANT CREATE SYNONYM TO user; 
      
    See Also:

    Oracle9i Database Administrator's Guide for further information about creating users

  4. Run the namesini.sql script located in $ORACLE_HOME/network/admin on UNIX operating systems and ORACLE_HOME\network\admin\names on Windows NT. This script creates the tables needed by Oracle Names to store information. Optionally, run namesupg.sql to upgrade old tables.
    SQL> CONNECT user/password
    SQL> @oracle_home/network/admin/namesini.sql;
    
Task 2: Create Oracle Names Servers

For each computer where Oracle Names is installed and where you want an Oracle Names server, create an Oracle Names server from Oracle Net Manager.

  1. Start Oracle Net Manager.

    See Also:

    "Starting Oracle Net Manager"

  2. In the navigator pane, expand Oracle Names Servers.
  3. Click plus (+) from the toolbar, or choose Edit > Create from the menu bar.

    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 select TCP/IP, then 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 select TCP/IP, then 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 that this Oracle Names server is in the root administrative region, configuration completes.

    If you specify that this Oracle Names server is not in the root administrative region, it assumes that 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. Choose File > Save Network Configuration.
  5. Repeat Steps 2 through 4 to create additional Oracle Names servers in a region. Oracle Net Manager does not support creation of multiple Oracle Names servers on one computer.

Oracle Net Manager creates a names.ora file with the following settings:

The names.ora file is created in the $ORACLE_HOME/network/admin directory on UNIX operating systems and the ORACLE_HOME\network\admin directory on Windows NT.

A names.ora file follows 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.us.acme.com

#Oracle Names server listening protocol address
NAMES.ADDRESSES=
 [(ADDRESS_LIST=]
 (ADDRESS=(PROTOCOL=tcp)(HOST=namesrv2-server)(PORT=1575)) 
 [(ADDRESS=...))][)]

#Database repository information
NAMES.ADMIN_REGION=
 (REGION=
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) 
    (CONNECT_DATA=
      (SERVICE_NAME=sales.us.acme.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=
  (HINT_DESC=
   (HINT_LIST=
     (HINT= 
      (NAME=namesvr1)
      (ADDRESS=(PROTOCOL=tcp)(HOST=namesvr1-server)(PORT=1575))
  
# Specify the domain controlled by this region and the time to live (TTL). 
If this is the root administrative region, specify NAME=(null) or NAME=. to 
identify the root domain.
NAMES.DOMAINS=
 (DOMAIN=
 (NAME=us.acme.com)
 (MIN_TTL=86400))
See Also:

Oracle9i Net Services Reference Guide for names.ora file parameters

Administering Multiple Domains

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

  1. In the navigator pane, expand Oracle Names Servers.
  2. Select the Oracle Names server.
  3. From the list in the right pane, select Configure Server.
  4. Click the Domains tab.
  5. Enter the domain name in the Domain Name field and time-to-live information, and then click Add.
  6. Repeat Step 5 for each additional domain.
  7. Choose File > Save Network Configuration.

In the following example, NAMES.DOMAINS contains a listing for the root (value of null), com, acme.com, and hq.acme.com domains. all the domain precedent to hq.acme.com must be defined in order to define hq.acme.com.

NAMES.DOMAINS=
 (DOMAIN_LIST=
 (DOMAIN=
  (NAME=)
  (MIN_TTL=86400))
 (DOMAIN=
  (NAME=com)
  (MIN_TTL=86400))
 (DOMAIN=
  (NAME=acme.com)
  (MIN_TTL=86400))
 (DOMAIN=
  (NAME=hq.acme.com)
  (MIN_TTL=86400)))
Task 3: Start the Oracle Names Server

To start the Oracle Names server, use either Oracle Net Manager or Oracle Names Control utility:

Use Oracle Net Manager... Use Oracle Names Control utility...
  1. In the navigator pane, expand Oracle Names Servers.
  2. Select the Oracle Names server.
  3. From the list in the right pane, select Manage Server.
  4. Click the Control tab.
  5. Click Start.
  6. Click Apply.

    The following message appears:

    Server started successfully.
    

    On Windows NT, a service called OracleHOME_NAMENamesonames_server is created.

From the operating system 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 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, a service called OracleHOME_NAMENamesonames_server is created

Checkpoint Files/Replicated Updates

To replicate data among Oracle Names server in checkpoint files, perform these tasks:

Task 1: Create an Oracle Names Server

For each computer where Oracle Names is installed and where you want an Oracle Names server, create an Oracle Names server from Oracle Net Manager:

  1. Start Oracle Net Manager.

    See Also:

    "Starting Oracle Net Manager"

  2. In the navigator pane, expand Oracle Names Servers.
  3. Click plus (+) from the toolbar, or choose Edit > Create from the menu bar.

    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 select TCP/IP, then 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.)

    • Verification that 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.

    • Verification that this Oracle Names server is in the root administrative region

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

    If you specify that this Oracle Names server is not in the root administrative region, it assumes that 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. Choose File > Save Network Configuration.
  5. Repeat Steps 2 through 4 to create additional Oracle Names servers in a region. Oracle Net Manager does not support creation of multiple Oracle Names servers on one computer.

Oracle Net Manager creates a names.ora file with the following settings:

The names.ora file is created in the $ORACLE_HOME/network/admin directory on UNIX operating systems and the ORACLE_HOME\network\admin directory on Windows NT.

A names.ora file follows 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.us.acme.com

NAMES.ADDRESSES=
 [(ADDRESS_LIST=]
 (ADDRESS=(PROTOCOL=tcp)(HOST=namesrv2-server)(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=
  (HINT_DESC=
   (HINT_LIST=
     (HINT= 
      (NAME=namesrv1)
      (ADDRESS=(PROTOCOL=tcp)(HOST=namesrv1-svr)(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=us.acme.com)
  (MIN_TTL=86400))
See Also:

Oracle9i Net Services Reference Guide for names.ora file parameters

Administering Multiple Domains

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

  1. In the navigator pane, expand Oracle Names Servers.
  2. Select the Oracle Names server.
  3. From the list in the right pane, select Configure Server.
  4. Click the Domains tab.
  5. Enter the domain name in the Domain Name field and time-to-live information, and then click Add.

  6. Repeat Step 5 for each additional domain.
  7. Choose File > Save Network Configuration.

In the following example, NAMES.DOMAINS contains a listing for the root (value of null), com, acme.com, and hq.acme.com domains. all the domain precedent to hq.acme.com must be defined in order to define hq.acme.com.

NAMES.DOMAINS=
 (DOMAIN_LIST=
 (DOMAIN=
  (NAME=)
  (MIN_TTL=86400))
 (DOMAIN=
  (NAME=com)
  (MIN_TTL=86400))
 (DOMAIN=
  (NAME=acme.com)
  (MIN_TTL=86400))
 (DOMAIN=
  (NAME=hq.acme.com)
  (MIN_TTL=86400)))
Task 2: Discover Oracle Names Servers

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

To discover other Oracle Names servers, use either Oracle Net Manager or Oracle Names Control utility:

Use Oracle Net Manager... Use Oracle Names Control utility...
  1. Start the first Oracle Names server in the region:

    a. In the navigator pane, expand Oracle Names Servers.

    b. Select the Oracle Names server.

    c. From the list in the right pane, select Manage Server.

    d. Click the Control tab.

    e. Click Server Operations, and then click Start.

    f. Click Apply to start the Oracle Names server. The following message appears:

    Server started successfully.

  2. From the second Oracle Names server, discover the first Oracle Names server. Choose Command > Discover Oracle Names Servers. The following message appears:
    Discovered Oracle Names Server in the 
    region. Please exit the tool and start 
    again.
    

    The Discover command produces an .sdns.ora file in $ORACLE_HOME/network/names on UNIX operating systems or a sdns.ora file in ORACLE_HOME\network\names on Windows. This file contains the names and addresses of the Oracle Names servers.

    If an Oracle Names server does not respond, a dialog prompts you for another Oracle Names server address. If you know the network address of a particular Oracle Names server, enter it.

  3. Start the second Oracle Names server, following Step 1.
  4. For each Oracle Names server added to the region, repeat Steps 2-3.
  1. Start the first Oracle Names server in the region:
    namesctl
    NAMESCTL> START
    
    
  2. From the second Oracle Names server, discover the first Oracle Names server.
    namesctl
    NAMESCTL> REORDER_NS
    
    

    The REORDER_NS command produces an .sdns.ora file in $ORACLE_HOME/network/names on UNIX operating systems or a sdns.ora file in ORACLE_HOME\network\names on Windows. This file contains the name and address of the first Oracle Names server.

    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-server)(
    PORT=1575))
    
  3. Start the second Oracle Names server in the region:
    NAMESCTL> START
    
    
  4. Connect to the first Oracle Names server in the region, and query for the second Oracle Names server to make sure it has registered itself.
    NAMESCTL> QUERY onames_server
    
    
  5. For each Oracle Names server added to the region, repeat Steps 2-4.
See Also:

"About Discovery"

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

To configure client and database server computers to use Oracle Names servers:

  1. Create a list of Oracle Names servers to contact, using one of the following methods:
    • Create a static list of preferred Oracle Names server in the sqlnet.ora file, as described in "Configuring Preferred Oracle Names Servers".
    • Discover Oracle Names servers by dynamically creating an .sdns.ora file in $ORACLE_HOME\network\names on UNIX operating systems, and sdns.ora file in ORACLE_HOME\network\names on Windows operating systems. This file contains the order of names and addresses of the Oracle Names server(s) to contact. Client computers read this file to find the addresses of Oracle Names servers to contact.

    Preferred Oracle Names servers take precedence over the Oracle Names servers configured in the .sdns.ora or sdns.ora file.

    See Also:

    "About Discovery" for a description of discovery

    To create an .sdns.ora file or an sdns.ora file, use either Oracle Net Manager or Oracle Names Control utility:

    Use Oracle Net Manager... Use Oracle Names Control utility...
    1. Start Oracle Net Manager.

      See Also: "Starting Oracle Net Manager"

    2. Choose Command > Discover Oracle Names Servers.

      The following message appears:

      Discovered Oracle Names Server 
      in the region. Please exit the 
      tool and start again.
      

      The Discover command produces an .sdns.ora file in $ORACLE_HOME/network/names on UNIX operating systems or a sdns.ora file in ORACLE_HOME\network\names on Windows. 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 does not respond, a dialog prompts you for another Oracle Names server address. If you know the network address of a particular Oracle Names server, enter it.

    Discover the other Oracle Names servers:

    namesctl
    NAMESCTL> REORDER_NS
    
    

    The REORDER_NS command produces an .sdns.ora file in $ORACLE_HOME/network/names on UNIX operating systems or a sdns.ora file in ORACLE_HOME\network\names on Windows. 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-ser
    ver)(PORT=1575))
    
  2. 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. In the navigator pane, expand Local > Profile.
    2. From the list in the right pane, select Naming.
    3. Click the Methods tab.
    4. From the Available Methods list, select ONAMES, and then click the right-arrow.
    5. From the Selected Methods list, select ONAMES, and then use the Promote button to move the selection to the top of the list.

    6. Choose File > Save Network Configuration.

    The sqlnet.ora file should contain an entry that lists onames first in the NAMES.DIRECTORY_PATH parameter:

    NAMES.DIRECTORY_PATH=(onames, tnsnames, hostname)
    
  3. You may configure additional features for clients that use Oracle Names. Table 9-4 describes the client sqlnet.ora file settings for Oracle Names.

    Table 9-4  Client Settings In sqlnet.ora for Oracle Names
    Oracle Net Manager Field sqlnet.ora Parameter Description

    Default Domain

    NAMES.DEFAULT_DOMAIN

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

    Maximum Wait Each Attempt

    NAMES.INITIAL_RETRY_
    TIMEOUT

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

    Attempts Per Names Server

    NAMES.REQUEST_RETRIES

    Specifies the number of times a client attempts to iterate through the list of Oracle Names servers before allowing the operation to fail. Oracle Net attempts 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. Oracle Net enables 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

    Enables you to preallocate an initial number of messages in a client's message pool. These messages may be used for future requests to Oracle Names servers. Oracle Net 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. In the navigator pane, expand Local > Profile.
    2. From the list in the right pane, select Naming.
    3. Click the Oracle Names tab.
    4. Enter data for the options indicated in the table on the previous page.
    5. Choose File > Save Network Configuration.

Task 5: (Optional) Configure Client Caches

To avoid clients sending requests to Oracle Names server for name lookups, you can create a client cache process local to the client. A client cache:

The most optimal environment for the client cache is a large multiuser computer where the users are running a particular Oracle client application. Clients on a single-user computer with wide-ranging interests in the databases will also derive some benefit from a cache.

A client cache involves running a