Net8 Administrator's Guide
Release 8.1.6

Part Number A76933-01

Library

Product

Contents

Index

Go to previous page Go to next page

6
Configuring Naming Methods

This chapter describes how to configure naming methods. This chapter includes the following sections:

Configuration Overview

To connect to a service, clients use a simple name, called a connect identifier in their connect string to connect to a service, rather than a complete connect descriptor. The connect descriptor contains:

A connect identifier can be net service name (a simple name for a service) or the actual name of the service. A connect identifier is resolved to a connect descriptor by a naming method specified for the client.

Once the connect identifier is resolved, the client then forwards the connection request to the listener. The listener compares the client information with the information it has received from the database service, as well as information it has stored in its own configuration file, listener.ora. If the information matches, a connection is granted.

Naming method configuration consists of creating connect descriptors for services and configuring clients to access the naming method.

Understanding 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 typical connect descriptor:

sales=
 (description= 
  (address= (protocol=tcp)(host=sales-server)(port=1521))
  (connect_data= 
     (service_name=sales.us.acme.com)))

The ADDRESS portion contains the listener protocol address, and the CONNECT_DATA portion 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 for an Oracle release 8.1 database service, you must identify the service with the SERVICE_NAME parameter. Optionally, you may 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 comprised of 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 is defaulted to the SID entered during installation or database creation.

See Also:

"Database Identification by Service Name Rather than SID" 

When creating a connect a descriptor for an Oracle release 8.0 or version 7 database, you must identify the service with the SID parameter. The value for the SID should match the ORACLE_SID environment variable or the registry entry. 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)))

Configuration Models

Net8 configuration is based upon one of two models:

Network Configuration Model  Suitable When...  Naming Method 

Localized management 

Network addresses are mapped in a tnsnames.ora file on each machine 

Local Naming

Host Naming 

Centralized management 

Networks where an Oracle Names server or directory performs network address resolution 

Directory Naming

Oracle Names

External Naming 

Naming Methods

Net8 supports the following naming methods:

Naming Method  Description 

Local Naming 

Stores net service names 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 

Stores services and net service names in a centralized LDAP-compliant directory service

See Also: "Configuring the Directory Naming Method" 

Oracle Names 

Stores services and net service names in an Oracle Names server.

See Also: "Configuring the Oracle Names Method" 

Host Naming 

Enables users to connect to an Oracle server by using a host name alias. Host names are mapped to the server's global database name in an existing names resolution service, such as Domain Name System (DNS), Network Information Service (NIS), 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 

Stores service information in an a third-party naming service

See Also: "Configuring External Naming Methods" 

See Also:

"Service Resolution through Naming Methods" 

Configuring the Local Naming Method

With the local naming method, net service names are added to the tnsnames.ora file. Each net service name is mapped to a connect descriptor. An example of a tnsnames.ora file's basic syntax for a net service name mapped to a connect descriptor is shown in the following:

sales=
(description= 
  (address=(protocol=tcp)(host=sales-server)(port=1521))
  (connect_data= 
     (service_name=sales.us.acme.com)))

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

Local naming configuration can be configured during or after installation, as described in the following sections:

Configuring the tnsnames.ora File During Installation

Net8 Configuration Assistant enables you to configure net service names for clients. It is launched by the Oracle Universal Installer after software installation. The configuration varies depending on the installation mode:

Typical or Minimal Installation

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

Custom Installation

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

Configuring the tnsnames.ora File After Installation

Net service names can be added 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

Task 1: Configure Net Service Names

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

Net8 Assistant

To configure net service names in the tnsnames.ora file with Net8 Assistant:

  1. Start Net8 Assistant:

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

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

  2. In the navigator pane, expand Local > Service Naming.

  3. Click "+" from the toolbar, or choose Create from the Edit menu.

    The Net Service Name Wizard starts.

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


    The net service name can be qualified with the client's domain. The net service name is automatically domain qualified if the NAMES.DEFAULT_DOMAIN parameter is specified in the sqlnet.ora file.

    See Also:

    "Configuring a Default Domain for Clients" 

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


  6. Enter the appropriate protocol parameters for the chosen protocol in the fields provided, then click Next:


    See Also:

    Appendix B for protocol parameter settings 

  7. Select a release, enter a destination service, then click Next:


    If the destination service is Oracle release 8.1, click (Oracle8i), and enter a service name in the Service Name field. If destination service is Oracle release 8.0 or version 7 database, click (Oracle8 or Previous), and enter an Oracle System Identifier for an instance in the Database SID field.

    See Also:

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

    Optionally, you can select a database connection type from the Oracle8i Connection Type list for this net service name. Oracle Corporation recommends you use the default setting of Database Default. If multi-threaded server (MTS) is configured in the initialization parameter file, you can select Dedicated Server to force the listener to spawn a dedicated server, bypassing MTS configuration. If MTS is configured in the initialization parameter file and you want to guarantee the connection always uses MTS, select Shared Server.

    See Also:

    Chapter 9 for further information about MTS configuration 

  8. Click Test to verify that the net service name works, then click Next.

    Testing assumes the database and listener are running. If they are not, see "Using Net8 Control Utilities" to start components, or click Next to disregard testing and continue to Step 10.

    A successful test results in the following message:


    If the test was not successful:

    • Ensure that 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 Name Wizard.

    See Also:

     

Net8 Configuration Assistant

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

  1. Start Net8 Configuration Assistant:

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

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

    The Welcome page appears:


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

    The Net Service Name Configuration page appears:


  3. Click Add, then Next.

    The Net Service Name Configuration, Database Version page appears:


  4. Select a release, then click Next:

    If the destination service is an Oracle8 release 8.1 database, click "Oracle8i database or service". If destination service is an Oracle8 release 8.0 or version 7 database, click "Oracle8 release 8.0 or Oracle7 database or service".

  5. 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 Net8 uses to resolve connect identifiers to connect descriptors.

To specify local naming as the first naming method:

  1. Start Net8 Assistant:

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

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

  2. In the navigator pane, expand Local > Profile.

  3. From the list in the right pane, select Naming.

  4. Click the Methods tab.

  5. Select TNSNAMES from the Available Methods list, then click the right-arrow button.

  6. Select TNSNAMES in the Selected Methods list, 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 over the tnsnames.ora and sqlnet.ora configuration files to the same location on the clients. This ensures that the files are consistent. Otherwise, you must use Net8 Assistant or Net8 Configuration Assistant on every client, introducing possible errors.

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 7 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, Microsoft's Active Directory, or Novell Directory Services. 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 Oracle Database Configuration Assistant during installation; net service name entries can be created with Net8 Assistant. Net8 Assistant can also be used to modify Net8 attributes of a database service entry and the net service name entries.

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

This section discusses the topics: in the following sections:

Directory Naming Configuration Steps

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

Task 1: Configure Directory Access 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 1: Configure Directory Access on Server and Clients

Before a database service or net service name can be added to a directory, directory access configuration must be completed. Directory access can be configured during or after installation, as described in the following sections.

Configuring Directory Access During Installation

Net8 Configuration Assistant is launched by Oracle Universal Installer after software installation. It enables you to configure access to a directory. Directory access configuration varies depending on the installation mode, as described in the following sections.

Custom Installation on the Server

After a Custom installation on the server, Net8 Configuration Assistant prompts you to configure access to a directory. Directory access configuration enables:

During directory access configuration, Net8 Configuration Assistant prompts you to configure the following directory access settings:

This information is stored in a read-only ldap.ora file that the client reads to locate the directory and Oracle entries to access.

If an Oracle Context does not exist in the directory, Net8 Configuration Assistant prompts you to create it. If the Oracle Context is created successfully, the authenticated user is added to the following groups in the directory:

Being a member of the OracleDBCreators and the OracleNetAdmins groups enables this user to use Oracle Database Configuration Assistant to create a database service and Net8 Assistant to create net service names or modify Net8 attributes of database services or net service names. A directory administrator can add other users to these groups.

See Also:

 

In addition, Net8 Configuration Assistant verifies that the Oracle schema was created. The Oracle schema defines the Oracle entries and their attributes. If the schema does not exist or is an older version, you are prompted to create it.

After Net8 Configuration Assistant completes configuration, Oracle Database Configuration Assistant creates the database. The service name for the database is automatically created under the Oracle Context.

See Also:

Oracle installation guide 

Client Installation

If you choose to configure the directory naming method, Net8 Configuration Assistant prompts you to configure access to a directory. Directory access configuration enables the client to look up connect identifier entries in the directory. If directory access is not configured, the client cannot use directory naming.

Net8 Configuration Assistant typically performs the necessary directory access configuration during client installation, and stores the following in a read-only ldap.ora file:

During directory access configuration, Net8 Configuration Assistant prompts you to configure the following directory access settings:

This information is stored in a read-only ldap.ora file that the client reads to locate the directory and Oracle entries to access.

In addition, Net8 Configuration Assistant verifies that the Oracle schema was installed. If an Oracle Context or the Oracle schema was not configured by the server, you cannot complete directory access configuration on the client.

Configuring Directory Access After Installation

If you plan to use the directory naming method, directory access must be configured. Directory access can be configured with Net8 Configuration Assistant at any time.

To configure directory access:

  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.

    The Welcome page appears:


  2. Select "Directory Service Access configuration", then click Next.

    The Directory Service Access page appears:


    Option  Description 

    Perform directory access configuration for client 

    Click to configure directory access on the clients. This option enables the client to look up directory entries. This option does not enable the client to add or modify entries in the directory. Directory access configuration on the client prompts you to configure the following:

    • Type of directory

    • Location of the directory

    • Administrative context from which this client can look up connect identifiers

    Note: If no Oracle Context or Oracle schema exists, you cannot configure the client for directory access. 

    Perform directory access configuration for server 

    Click to configure directory access on the server. This option enables the server to add, modify, and look up directory entries. Directory access configuration on the server prompts you to configure the following:

    • Type of directory

    • Specify the location of the directory

    • Administrative context from which this server can access and create Oracle entries

      If an Oracle Context does not exist in the directory, you are prompted to create one.

    Net8 Configuration Assistant also verifies the Oracle schema is created in the directory. If the schema does not exist or is an older version, you are prompted to create it.

    If the Oracle Context is created successfully, the authenticated user is added to the following groups in the directory:

    • OracleDBCreators (cn=OracleDBCreators,cn=OracleContext)

    • OracleNetAdmins (cn=OracleNetAdmins,cn=OracleContext)

    • OracleSecurityAdmins (cn=OracleSecurityAdmins,cn=OracleContext)

    Being a member of the OracleDBCreators and the OracleNetAdmins groups enables this user to use Oracle Database Configuration Assistant to create a database service and Net8 Assistant to create net service names or modify Net8 attributes of database services or net service names. A directory administrator can add other users to these groups.

    See Also:

     

    Create or Update Schema 

    Click to create or update the Oracle schema in the directory. 

  3. Select the appropriate option, then follow the prompts in the wizard and online help to complete directory access configuration.

Task 2: Create Net Service Name Entries (Optional)

You can configure clients to use a net service name rather than the database service entry created by Oracle Database Configuration Assistant. Net service names are created under the Oracle Context (cn=OracleContext).


Note:

Only users that are members of the OracleNetAdmins group are allowed to create net service entries in a directory. The authenticated user that created the Oracle Context during directory access on the server is automatically a member of this group. To add or remove users from this group, see "Adding Users to and Removing Users from the OracleNetAdmins Group"



Note:

Net service names stored in a tnsnames.ora file or an Oracle Names server can be exported into a directory server, as described in "Exporting Net Service Names from a tnsnames.ora File" and "Exporting Network Objects from an Oracle Names Server"


To create a net service name in a directory server:

  1. Start Net8 Assistant on a machine that has been configured with directory access for a server:

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

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

  2. In the navigator pane, expand Directory > Service Naming.

  3. Click "+" from the toolbar, or choose Create from the Edit menu.

    The Net Service Name Wizard starts.

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


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


  6. Enter the appropriate protocol parameters for the chosen protocol in the fields provided, then click Next:


    See Also:

    Appendix B for protocol parameter settings 

  7. Select a release, enter a destination service, then click Next:


    If the destination service is an Oracle release 8.1 database, click (Oracle8i), and enter a service name in the Service Name field. If destination service is Oracle release 8.0 or version 7, click (Oracle8 or Previous), and enter an Oracle System Identifier (SID) in the Database SID field.

    See Also:

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

    Optionally, you can select a database connection type from the Oracle8i Connection Type list for this net service name. Oracle Corporation recommends you use the default setting of Database Default. If multi-threaded server (MTS) is configured in the initialization parameter file, you can select Dedicated Server to force the listener to spawn a dedicated server, bypassing MTS configuration. If MTS is configured in the initialization parameter file and you want to guarantee the connection always uses MTS, select Shared Server.

    See Also:

    Chapter 9 for further information about MTS configuration 

  8. Click Test to verify that the net service name works, then click Next.

    Testing assumes the database and listener are running. If they are not, see "Using Net8 Control Utilities" 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 that 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 Name Wizard.

    See Also:

     

Task 3: Configure LDAP as the First Naming Method

After database services or net service names are configured as entries in the directory, set 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 Net8 can use to resolve connect identifiers to connect descriptors.

To specify local naming as the first naming method:

  1. Start Net8 Assistant:

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

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

  2. In the navigator pane, expand Local > Profile.

  3. From the list in the right pane, select Naming.

  4. Click the Methods tab.

  5. Select LDAP from the Available Methods list, then click the right-arrow button.

  6. Select LDAP in the Selected Methods list, 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 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 7 for listener configuration details 

Task 5: Connect to the Database

Clients that are configured with an administrative context that matches the administrative context for the entry the client is looking up can connect to the database using the following syntax:

CONNECT username/password@connect_identifier

Clients that are configured with an administrative context that does not match the entry's administrative context 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:

Only users that are members of the OracleNetAdmins group are allowed to modify Net8 attributes for database service entries. The authenticated user that created the Oracle Context during directory access on the server is automatically a member of this group. To add or remove users from this group, see "Adding Users to and Removing Users from the OracleNetAdmins Group"


A database service entry is created by Oracle Database Configuration Assistant during database creation after directory access has been configured on the server. The entry is contained under an Oracle Context (cn=OracleContext).

A database service entry stored in a directory may not contain any network route information. A network route that includes the location of the listener through a protocol address must be included in the connect descriptor. Otherwise, the client has no way of locating the listener.


Note:

Database services stored in an Oracle Names server can be exported into a directory, as described in "Exporting Net Service Names from a tnsnames.ora File" and "Exporting Network Objects from an Oracle Names Server"


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

  1. Start Net8 Assistant on a machine that has been configured with directory access for a server:

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

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

  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 "+". A new address tab appears.

  5. Select a protocol and enter the appropriate protocol parameter information for the selected protocol.

    See Also:

    Appendix B for protocol parameter settings 

  6. In the right pane, click Apply.

Adding Users to and Removing Users from the OracleNetAdmins Group

The user that creates the Oracle Context is a member of the OracleNetAdmins (cn=OracleNetAdmins,cn=OracleContext) group. Using directory tools, such as ldapmodify, a directory administrator or the directory user who created the Oracle Context can add users to this group.

To add a user to the OracleNetAdmins group with ldapmodify:

  1. Create a LDAP Data Interchange Format (LDIF) file that specifies that you want to add a user to the OracleNetAdmins group. You can use the following sample LDIF file with your own settings for the Distinguished Name (DN) for cn=OracleNetAdmins and the user that you want to add.

    dn: cn=OracleNetAdmins,cn=OracleContext,...
    changetype: modify
    add: uniquemember
    uniquemember: <DN of user being added to group>
    
    
  2. Use the following ldapmodify syntax to add the user:

    ldapmodify -h host -p port -D binddn 
    -w password -file ldif_file

    Argument  Description 

    -h host 

    Specifies the directory server host 

    -p port 

    Specifies the listening TCP/IP port for the directory server. If you do not specify this option, the default port (389) is used. 

    -D binddn 

    Specifies the directory administrator or user DN. 

    -w password 

    Specifies the password for the directory administrator or directory user. 

    -f ldif_file 

    Specifies the input file name  

To remove a user from the OracleNetAdmins group with ldapmodify:

  1. Create a LDIF file that specifies that you want to add a user to the OracleNetAdmins group. You can use the following sample LDIF file with your own settings for the distinguished name (DN) for cn=OracleNetAdmins and the user that you want to add.

    dn: cn=OracleNetAdmins,cn=OracleContext,...
    changetype: modify
    delete: uniquemember
    uniquemember: <DN of user being delete from group>
    
  2. Use the following ldapmodify syntax to add the user:

    ldapmodify -h host -p port -D binddn 
    -w password -file ldif_file

Exporting Net Service Names from a tnsnames.ora File

If a tnsnames.ora file already exists, its net service names can be exported to a directory server. The export is performed for one domain at a time.

Exporting a tnsnames.ora file creates new net service name entries in the currently selected Oracle Context (cn=OracleContext). If you need to change the Oracle Context, choose Command > Directory Server > Change Oracle Context in Net8 Assistant.

The computer where you intend to perform the export of data must be configured for server directory access.

See Also:

"Task 1: Configure Directory Access on Server and Clients" 

To export net service names contained in a tnsnames.ora file to a directory:

  1. Start Net8 Assistant:

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

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

  2. Choose Command > Directory > Import Net Service Names. The Directory Server Migration Wizard starts.


  3. Click Next.

    If multiple domains were detected, the Select Domain page appears:


    If the net service names are not domain qualified, the Select Net Service Names page appears, as shown in Step 4.

  4. From the list, select the network domain whose net service names you want to export.

    The Select Net Service Names page appears:


  5. Select the net service names from the list to export, then click Next.

    The Select Destination Context page appears:


  6. Select the directory naming context that contains the Oracle Context from the Directory Naming list. The directory naming context is part of a directory subtree that contains one or more Oracle Contexts.

  7. Select the Oracle Context to which you want to export the selected net service names from the Oracle Context list.

  8. Click Next.

    The wizard exports the net service names:


  9. Click Finish to dismiss the Directory Server Migration Wizard.

Exporting Network Objects from an Oracle Names Server

Database services and net service names stored in an Oracle Names server can be exported to a directory or to an LDAP Data Interchange Format (LDIF) file. Data is exported from a specified domain. If the domain has authority for subdomains, their data can also be exported.

Prerequisite:

The computer where you intend to perform the export of data must be configured for server directory access, as described in "Task 1: Configure Directory Access on Server and Clients"

The steps and examples to perform an export of data are explained in the following sections:

Task 1: Create Structure in Directory

Configure the directory with Directory Information Tree (DIT) for the Oracle Names objects. You can replicate the domain structure you currently use with Oracle Names, or you can develop an entirely different structure.

Oracle Corporation recommends creating an Oracle Context (cn=OracleContext) to store Net8 objects.

See Also:

Chapter 2 for further information about the Oracle Context 

Task 2: Obtain List of Objects to Export

Determine the Oracle Names domain structure and the objects within that structure. NAMESCTL offers three commands to help you with this task:

Command  Description 

LIST_DOMAINS 

Lists all the authoritative domains.

See Also: LIST_DOMAINS 

LIST_DELEGATED 

Lists all the delegated domains.

See Also: LIST_DELEGATED 

LIST_OBJECTS 

Lists all the authoritative network objects.

See Also: LIST_OBJECTS 

Task 3: Export Objects To a Directory Server

The NAMESCTL utility exports network objects into the directory with the DUMP_LDAP command. This command enables you to export network objects to an LDIF file or directly into a directory.

The syntax to export data to a LDIF file is as follows:

NAMESCTL
NAMESCTL> dump_ldap [source] [destination] [options] {-f filename}


Note:

The generated LDIF file can later be loaded into the directory with the ldap_modify command. See your directory's documentation for syntax usage. 


The syntax to export data directly to a directory is as follows:

NAMESCTL
NAMESCTL> dump_ldap [source] [destination] [options] {-h host} {-p 
port} {-D user_dn} {-w password} 

See Also:

DUMP_LDAP for a description of the arguments. 

Exporting Domains To a Similar DIT

If your directory's DIT structure has been designed with domain components (dc) to match the current Oracle Names structure, review the following examples to understand how to export data:

Example 1: Exporting Data from a Single Domain to the Same DIT Node

Figure 6-1 shows an Oracle Names domain structure of acme.com. It contains a database service called db. The directory DIT has been designed with domain components that match the Oracle Names structure. With this DIT structure, db can be exported to cn=OracleContext,dc=acme,dc=com:

Figure 6-1 Single Domain Export to the Same DIT Node


Either of the following syntax can be used to export data from Oracle Names to the configured DIT structure:

NAMESCTL> dump_ldap acme.com (dn:cn=OracleContext,dc=acme,dc=com) -f sample.ldif
NAMESCTL> dump_ldap acme.com -x -f sample.ldif

In the first line of syntax, the destination DN is explicitly specified. It is not necessary to specify the destination DN, as shown in the in the second line of syntax, because the destination DN matches the domain model used in Oracle Names. The -x option is used to pre-append cn=OracleContext to the left of the destination DN. In other words, you can use -x instead of specifying cn=OracleContext in the DN. This way, all objects can be created under a cn=OracleContext RDN in the directory.

The database service db is exported to cn=OracleContext,dc=acme,dc=com and has a DN location of (dn:cn=db,cn=OracleContext,dc=acme,dc=com).

Example 2: Exporting Data from a Domain Tree to a Similar DIT

Data can be exported from a root domain and its subdomains in Oracle Names to a directory that uses a similar DIT.

Figure 6-2 shows an Oracle Names structure that contains a root domain of acme.com and subdomains of sales.acme.com and dev.acme.com. Database services of db, orders, and widgets reside in acme.com, sales.acme.com and dev.acme.com, respectively. The directory DIT is similar to the Oracle Names structure.

Figure 6-2 Root and Subdomain Domain Export to Similar DIT


The following syntax is used to export data from the acme.com root domain and its subdomains to the configured DIT structure:

dump_ldap acme.com -R -x -f sample.ldif 

The following table shows how database objects in acme.com, sales.acme.com, and dev.acme.com are mapped to DNs in the directory. Because -x is used, all objects are created under cn=OracleContext RDNs in the directory.

Database Object in Oracle Names  New DN in Directory 

db.acme.com 

dn:cn=db,cn=OracleContext,dc=acme,dc=com 

orders.sales.acme.com 

dn:cn=orders,cn=OracleContext,dc=sales,
dc=acme,dc=com
 

widgets.dev.acme.com 

dn:cn=widgets,cn=OracleContext,dc=dev,
dc=acme,dc=com
 

Exporting Domains To a Dissimilar DIT

If your directory's DIT structure has been designed with a DIT that is dissimilar to the current Oracle Names domain structure, review the following examples to understand how to export data:

Example 1: Exporting Data from a Single Domain to a Non-DC Node

Figure 6-3 shows an Oracle Names domain structure of acme.com. It contains a database service called db. The directory has been designed with a DIT of cn=OracleContext,o=acme,c=us.

Figure 6-3 Single Domain Export to One DIT Node


The following syntax can be used to export data from the acme.com domain to the configured DIT structure:

dump_ldap acme.com (dn:c=us,o-acme) -x -f sample.ldif

Because the DIT is different from the Oracle Names structure, the destination DN must be explicitly specified. The -x option is used to pre-append cn=OracleContext to the left of the destination DN. In other words, you can use -x instead of specifying cn=OracleContext in the DN. This way, objects can be created under a cn=OracleContext RDN in the directory.

Example 2: Exporting Data from a Domain Tree to a Non-DC DIT

Data can be exported from a root domain and its subdomains in Oracle Names to a directory that uses a dissimilar DIT. RDNs in the destination DN must be wildcarded--that is, specified without a value--for the subdomains.

Figure 6-4 shows an Oracle Names structure that contains a root domain of acme.com and subdomains of sales.acme.com and dev.acme.com. Database services of db, orders, and widgets reside in acme.com, sales.acme.com and dev.acme.com, respectively. The directory DIT has a top-level structure of o=acme,c=us that correlates to the acme.com in Oracle Names. The subtrees, ou=sales and ou=dev, correlate to the sales.acme.com and dev.acme.com subdomains in Oracle Names.

Figure 6-4 Root and Subdomain Domain Export to Dissimilar DIT

The following syntax is used to export data from the acme.com root domain and its subdomains to the configured DIT structure:

dump_ldap acme.com (dn:ou,o=acme,c=us) -R -x -f sample.ldif 

Note that organizationalUnitName (ou) is wildcarded--that is, it contains no value--so that the sales and dev subdomain of acme.com in the source region can be mapped to an ou.

The following table shows how database objects in acme.com, sales.acme.com, and dev.acme.com are mapped to DNs in the directory. Because -x is used, all objects are created under cn=OracleContext RDNs in the directory.

Database Object in Oracle Names  New DN in Directory 

db.acme.com 

dn:cn=db,cn=OracleContext,o=acme,c=us 

orders.sales.acme.com 

dn:cn=orders,cn=OracleContext,ou=sales,
o=acme,c=us
 

widgets.dev.acme.com 

dn:cn=widgets,cn=OracleContext,ou=dev,
o=acme,c=us
 

If acme.com contained a subdomain of mktg.dept.acme.com, that subdomain's network objects would not exported. This is because the destination DN (dn:ou,o=acme,c=us) only permits one-level subdomains. In order to export objects from mktg.dept.acme.com, the following syntax would be required:

dump_ldap acme.com (dn:ou,ou,o=acme,c=us) -x -f sample.ldif

This enables up to two levels of subdomains to be exported. By adding additional wildcards, you can specify any level of depth.

Example 3: Exporting Data from Multiple Domains to One DIT Node

Data can be exported from multiple domains to one node in the destination DIT.

Figure 6-5 shows an Oracle Names structure that contains a root domain of acme.com and subdomains of sales.acme.com and dev.acme.com. Database services of db, orders, and widgets reside in acme.com, sales.acme.com and dev.acme.com, respectively. The directory DIT has a structure of o=IS,c=uk that contains no subtrees that correlate to the Oracle Names subdomains.

Figure 6-5 Root and Subdomain Domain Export to One DIT Node

All data can be exported from the root domain and the subdomains to cn=OracleContext,o=IS,c=uk in the DIT with the following syntax:

dump_ldap acme.com (dn:o=IS,c=uk) -R -x -f sample.ldif

The following table shows how database objects in acme.com, sales.acme.com, and dev.acme.com are mapped to DNs in the directory. Because -x is used, all objects are created under cn=OracleContext RDNs in the directory.

Database Object in Oracle Names  New DN in Directory 

db.acme.com 

dn:cn=db,cn=OracleContext,o=IS,c=uk 

orders.sales.acme.com 

dn:cn=orders,cn=OracleContext,o=IS,c=uk 

widgets.dev.acme.com 

dn:cn=widgets,cn=OracleContext,o=IS,c=uk 

If one of the subdomain contained a database object named db, it would not be exported, because its name would collide with the db object exported from db.acme.com.

Example 4: Reorganizing a Tree Structure During an Export

In the previous examples, you saw how data can be exported to a non-DC DIT and how data can be exported from multiple domains to a one node in the DIT. This example combines these two types of exports to demonstrate how to export data to DIT with a very different structure.

Figure 6-6 shows an Oracle Names structure that contains a root domain of acme.com and four subdomains, each of which contains at least one database service object. The directory DIT has a top-level structure of dc=acme,dc=com that correlates to the acme.com domain in Oracle Names. The two subtrees, dc=intranet and dc=storefront, are unrelated to the subdomains in Oracle Names.

Figure 6-6 Multiple Domain Export to Two Subtrees

In order to export data from the Oracle Names structure to the DIT, each domain must be exported separately:

dump_ldap IS.acme.com (dn:dc=intranet,dc=com,dc=acme) -x -f sample.ldif
dump_ldap hr.acme.com (dn:dc=intranet,dc=com,dc=acme) -x -f sample.ldif
dump_ldap warehouse.acme.com (dn:dc=storefront,dc=com,dc=acme) -x -f sample.ldif
dump_ldap sales.acme.com (dn:dc=storefront,dc=com,dc=acme) -R -x -f sample.ldif

The first two dump_ldap commands export database objects to cn=Oraclecontext,dc=intranet,dc=acme,dc=com; the last two dump_ldap commands export database objects to cn=Oraclecontext,dc=storefront,dc=acme,dc=com. -R in the dump_ldap sales.acme.com command enables the database service objects to be exported from sales.acme.com, europe.sales.acme.com, and pacific.sales.acme.com.

The following table shows how database objects in the Oracle Names domains are mapped to DNs in the directory. Because -x is used, all objects are created under cn=OracleContext RDNs in the directory.

Database Object in Oracle Names  New DN in Directory 

revenue.IS.acme.com 

dn:cn=revenue,cn=OracleContext,dc=intra,dc=acme,
dc=com
 

expense.IS.acme.com 

dn:cn=expense,cn=OracleContext,dc=intra,dc=acme,
dc=com
 

emp.hr.acme.com 

dn:cn=emp,cn=OracleContext,dc=intra,dc=acme,dc=com 

inventory.warehouse.com 

dn:cn=inventory,cn=OracleContext,dc=storefront,
dc=acme,dc=com
 

customer.sales.acme.com 

dn:cn=customer,cn=OracleContext,dc=storefront,
dc=acme,dc=com
 

clients.europe.sales.acme.com 

dn:cn=clients,cn=OracleContext,dc=storefront,
dc=acme,dc=com
 

orders.pacific.sales.acme.com 

dn:cn=orders,cn=OracleContext,dc=storefront,
dc=acme,dc=com
 

Configuring 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 Oracle8i Migration


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.

Configuring Oracle Names involves the following tasks:

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:

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

File  Description 

ckcfg.ora 

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 which has been retrieved and cached from remote regions and has not expired yet 

ckpreg.ora 

Contains all authoritative data for the region. If the Oracle Names server uses a region database, then this checkpoint file is 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 databases is inaccessible.

If the server is not using the database, this file is its only persistent storage and is loaded by the Oracle Names server at startup. The Oracle Names server considers the data in the region checkpoint file to be current if there are no other Oracle Names servers in the region. In this case, the file is 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 choose, Oracle Corporation recommends 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 listening address defaults to TCP/IP, port 1575 on the local host, or other well-known addresses for protocols.

See Also:

Your Oracle operating-system documentation for default address information 

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.

    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 upgrade old tables.

    SQL> CONNECT user/password
    SQL> @oracle_home/network/admin/namesini.sql;
    
Task 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 Net8 Assistant.

  1. Start Net8 Assistant:

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

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

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

  3. Choose Edit > Create, or click 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 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 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. Choose File > Save Network Configuration.

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

Net8 Assistant creates a names.ora file with at least the following settings:

A names.ora file is shown next 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-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=
  (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 Also:

Appendix B 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 Net8 Assistant:

  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, 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, 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)))
Task 3: Start the Oracle Names Server

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

Use Net8 Assistant...  Use the NAMESCTL 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 OracleORACLE_HOMENamesonames_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, a service called OracleORACLE_HOMENamesonames_serverService is created 

Replicate Data in Checkpointed Files

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

Task 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 Net8 Assistant:

  1. Start Net8 Assistant:

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

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

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

  3. Choose Edit > Create, or click 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 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 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. Net8 Assistant does not support creation of multiple Oracle Names servers on one machine.

Net8 Assistant creates a names.ora file with at least the following settings:

A names.ora file is shown next 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=...))]


#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 Also:

Appendix B 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 Net8 Assistant:

  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, 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, 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)))
Task 2: Discover Oracle Names Servers

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

Use Net8 Assistant...  Use the NAMESCTL 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, 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.

    a. 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 or a sdns.ora file 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 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 or a sdns.ora file in ORACLE_HOME\network\names on Windows platforms. This file should contain 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-pc)(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:

"Understanding Discovery" 

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

To configure client and database server machines 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 an 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 Net8 Assistant or the NAMESCTL utility.

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

    See Also:

    "Understanding Discovery" for a description of discovery 

    To create an .sdns.ora file or an sdns.ora file:

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

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

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

    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 .sdns.ora file in $ORACLE_HOME/network/names on UNIX or a sdns.ora file 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 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 or a sdns.ora file 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))
    

     

    1. 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. Select ONAMES from the Available Methods list, then click the right-arrow.

      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 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)
      
    1. You may configure additional features for clients that use Oracle Names. These features are listed and described in the following table:

      Net8 Assistant 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. Net8 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. Net8 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. Net8 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. Net8 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 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. 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: Configure the Listener

Configure the listener with listening database protocol addresses if you are not using your operating system's primary protocol.

See Also:

Chapter 7 for listener configuration details 

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

To set the USE_PLUG_AND_PLAY parameter:

  1. Start Net8 Assistant:

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

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

  2. In the navigator pane, expand Local > Listeners

  3. Select a listener.

    =

  4. From the list in the right pane, select General Parameters.

  5. Click the General tab.

  6. Click "Register Service with Oracle Names".

  7. Choose File > Select Save Network Configuration.

Task 6: Register Data with the Oracle Names Server

As described in the table in "Configuring the Oracle Names Method", an Oracle Names server stores many kinds of information, including 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 any of the following kinds of information, you must register it using either Net8 Assistant or the NAMESCTL control utility:

Registration needs to occur with only one Oracle Names server in an administrative region. The other Oracle Names servers see the information if data is stored in a region database, or the information is 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 Net8 Assistant or NAMESCTL Utility".

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 must 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 Net8 Assistant or the NAMESCTL control utility:

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

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

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

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

  3. Select an Oracle Names server.

  4. From the list in the right pane, select Manage Data.

  5. Click the Net Service Names tab.

  6. Click Add.

  7. Enter name in the Service Name field. The net service name may be qualified with the domain. The net service name is automatically domain qualified if the domain is specified.

    See Also: "Configuring a Default Domain for Clients"

  8. Select a protocol the listener is configured to listen on.

  9. Enter the appropriate protocol parameters for the chosen protocol in the fields provided.

    See Also: Appendix B for more information about protocol syntax needed for address information

    Note: Additional addresses can be created by clicking "+" at the bottom of the Address tab.

  10. Enter a destination service. If the destination service is an Oracle release 8.1 database, enter the service name in the Service Name field. If destination service is prior to release 8.1, click "Oracle8i Release 8.0 Compatible Identification", then enter its SID in the SID field.

    Note: If you want to configure advanced CONNECT_DATA options besides the destination service, click Advanced.

  11. Click Execute.

  12. Choose File > Save Network Configuration.

 

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

NAMESCTL
NAMESCTL> register net_service_name -d 
(description=[(address_list=](address= ...)(connect_
data=(service_name|sid=)))[)] 

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-serv
er)(port=1521))(connect_data=(service_
name=sales.us.acme.com)))

See Also: Appendix B for more information about protocol syntax needed for address information and "CONNECT_DATA Section" for CONNECT_DATA parameters 

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 Net8 Assistant or the NAMESCTL control utility:

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

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

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

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

  3. Select an Oracle Names server.

  4. From the list in the right pane, select Manage Data.

  5. Click the Net Service Names tab.

  6. Click Load.

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

  8. Click Execute.

  9. Choose File > Save Network Configuration.

 

From the command line, enter:

NAMESCTL
NAMESCTL> load_tnsnames tnsnames.ora
 

Global Database Links Credentials and Database Qualifiers

Oracle Corporation recommends having one global database link per database. A global database link that is the same as the global database name is automatically registered with the Oracle Names server.

For example, if the global database name is sales.us.acme.com, a global link with the same name is registered with the Oracle Names server. You verify a global database link is working correctly by performing a SELECT statement on a table, for example:

SQL> SELECT * from emp@sales.us.acme.com

Unless you want to specify user name and password credentials for a global database link, no additional configuration is required to use the global database link.

To define a user name and password for a global database link, use either Net8 Assistant or the NAMESCTL control utility. Because the NAMESCTL utility is limited in global database link registration functionality, Oracle Corporation recommends you use Net8 Assistant.

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

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

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

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

  3. Select an Oracle Names server.

  4. From the list in the right pane, select Manage Data.

  5. Click the 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 initialization parameter 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. Choose File > Save Network Configuration.

 

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

NAMESCTL
NAMESCTL> register dblink -d 
(description=(address= ...))

For example, to register a global database link of sales.us.acme.com with a default TCP/IP listening address, enter:

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

See Also: Appendix B for more information about protocol syntax needed for address information

The NAMESCTL utility does 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 EMP can be appended to sales.us.acme.com. A connection to a remote database with the global database link and link qualifier would be:

SQL> CONNECT @sales.us.acme.com@emp

Adding Link Qualifiers

Link qualifiers are primarily for older Oracle database environments where multiple database links are used to get to the different schemas in the database. Rather than use multiple database links, multiple link qualifiers can be created for a database link. Multiple link qualifiers enable the global database links to comply with the GLOBAL_NAMES=TRUE setting in the initialization parameter file, which enables the global database link to be set to the global database name.

To create a global link qualifier for a global database link, use 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 and 4 for each link qualifier you want to add.

  6. Click Execute.

  7. Choose File > Save Network Configuration.

To verify a global database link and link qualifier is working correctly, 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.us.acme.com;
sql> SELECT * from EMP@sales.us.acme.com@emp;

See Also:

Oracle8i Distributed Database Systems 

Aliases

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

To create an alias, use either Net8 Assistant:

  1. Start Net8 Assistant:

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

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

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

  3. Select an Oracle Names server.

  4. From the list in the right pane, select Manage Data.

  5. Click the Aliases tab.

  6. Select Add.

  7. Enter the alias in the Alias field and the actual name of the object in the Canonical Name field.

  8. Click Execute.

  9. Choose File > Save Network Configuration.

Task 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 assumes authority over all sub-domains.

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

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

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

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

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

  2. In the navigator pane, expand Oracle Names Servers

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

  4. From the list in the right pane, select Manage Data.

  5. Click the Topology tab.

  6. Click 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 its protocol address in the Names Server Address field.

    See Also: Appendix B for more information about protocol syntax needed for address information

  9. Click Execute.

  10. Choose File > Save Network Configuration.

 

Create and register an alias with the Oracle Names server:

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

See Also: Appendix B for more information about protocol syntax needed for address information


For example, to delegate domain us.acme.com serviced by namesrv3.us.acme.com, enter:

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

Task 8: Connect to the Database

Clients can connect to the database using the following syntax:

CONNECT username/password@net_service_name
CONNECT username/password@database_service

Configuring the Host Naming Method

In environments where simple connectivity is desired, host naming can eliminate the need for service name lookup in the tnsnames.ora files. However, for large or complex environments where advanced features such as connection pooling, external procedures, or Heterogeneous Services, which require additional connect information, are desired, host naming is not suitable. 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. The global database name is equal to a host name on an alias in an existing name resolution service. Clients use this name 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:

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

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 next:

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

See Also:

"Configuring Static Service Information" 

Task 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 can use to resolve connect identifiers to connect descriptors.

To specify host naming as the first naming method:

  1. Start Net8 Assistant:

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

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

  2. In the navigator pane, expand Local > Profile.

  3. From the list in the right pane, select Naming.

  4. Click the Methods tab.

  5. Choose HOSTNAME from the Available Methods list, then click the right-arrow button.

  6. Select HOSTNAME in the Selected Methods list, 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 HOSTNAME first:

names.directory_path=(hostname, tnsnames)

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

For example, if a global database name of sales.us.acme.com for a database exists on a machine named sales-server, the entry in the /etc/hosts file would look like the following.

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

Note that the domain portion of the global database name must match the network domain.

Task 4: Connect to the Database

Clients can connect to the database using the alias. Using the example in "Task 3: Set Up Host Name Resolution Environment", the connect string, the client can use sales.us.acme.com in the connect string:

CONNECT username/password@sales.us.acme.com

If the client and server are in the same domain of us.acme.com, the client needs to enter only sales in the connect string.

Configuring External Naming Methods

External naming refers to the method of resolving a net service name, stored in a non-Oracle naming service, to a network address. External naming services include:

Configuring NIS

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

When a user gives a command such as

sqlplus scott/tiger@payroll

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

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

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

System Requirements

NIS External Naming requires SQL*Net 2.2 or greater.

Task 1: Configure NIS Servers to Support the NIS External Naming

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

Add the "tnsnames" Map to the Existing Set of NIS Maps

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

  1. Create a tnsnames.ora file, as specified in "Configuring the Local Naming Method".


    Note:

    Keep a copy of the tnsnames.ora file, preferably in $ORACLE_HOME/network/admin directory. You may need to use this file again later to load net service names into the NIS map. 


  2. Convert the contents of the tnsnames.ora file to a tnsnames map using the tns2nis program.


    Note:

    The tns2nis program is supplied with NIS External Naming on the Oracle Universal Installer tape or disk. 


    For example, run tns2nis on the command line with one argument:

    tns2nis tnsnames.ora
    
    

    tns2nis reads the native.ora file from the current directory. (If tnsnames.ora file is not located in the current directory, you can use a full path name to specify its location--for example, /etc/native.ora or $ORACLE_HOME/network/admin/tnsnames.ora).

    The "tnsnames" map is then written into the current working directory.

  3. Copy tnsnames to the NIS server, if it is not already there.

  4. Install the tnsnames map using makedbm, which is an NIS program. Refer to your NIS documentation for more information.


    Note:

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


    makedbm converts the tnsnames map into two files that the NIS server can read. The location of these files is platform-specific. Refer to your platform-specific documentation for details.

    For example, to generate and install a tnsnames map on the Sun Solaris, as root enter the following at the command line

    # makedbm tnsnames /var/yp/'domainname'/tnsnames 
    
Verifying that the "tnsnames" Map Has Been Properly Installed

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

ypmatch net_service_name tnsnames 

For example, you might enter:

ypmatch payroll.com tnsnames 

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

99 (description=(address=(protocol=tcp)
 (host=garlic)(port=1999)))
 (connect_data=(service_name=dirprod)))

Task 2: Configure Clients

To configure clients, configure NIS 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 can use to resolve connect identifiers to connect descriptors.

  1. Start Net8 Assistant:

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

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

  2. In the navigator pane, expand Local > Profile.

  3. From the list in the right pane, select Naming.

  4. Click the Methods tab.

  5. Select NIS from the Available Methods list, then click the right-arrow button.

  6. Select NIS in the Selected Methods list, 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 NIS first:

    names.directory_path=(nis, hostname, tnsnames)
    

Configuring NDS

NDS external naming enables you to use native NDS naming conventions to connect to an Oracle database on a Novell NDS-enabled network. After the NDS external naming has been installed on clients and servers, users can enter:

username/password@.OracleInstance.Context

NDS external naming provides network users with the following benefits:

Client Operations

NDS external naming resides on the client workstation and translates the NDS object name into a network address. The client code gets attributes from the NDS tree for the NDS object whose name matches the Oracle database. This name can be a full name or a partial name. If it is a partial name, it is qualified with respect to the current naming context.

Netware Server Operations

There are three aspects to the server-side NDS External Naming:

Schema Extension

During the Oracle installation process on Netware 4 and 5 servers the NDS schema is extended to include an object class called "ORACLE:DBInstance". For NDS external naming to function, this class needs an attribute called "ORACLE:TNSAddress". If the class does not exist, it is created and includes the TNSAddress attribute. If the class exists but the TNSAddress attribute does not, the class is modified. The Netware Loadable Module (NLM) that performs this during installation is called ORASCHEM.NLM.

SAP (Service Advertising Protocol) Disabling

The SPX protocol for Netware looks for a value in the config.ora file called ORACLE_SAP. The value of this parameter is ON or OFF. If this parameter is not specified, the default is ON. This has performance implications for SPX networks. When ORACLE_SAP is ON, the listener advertises its address using SAP (Service Advertising Protocol). When ORACLE_SAP is set to OFF, the listener relies on NDS to deliver information to its clients.

If your network consists entirely of NDS enabled clients--that is, clients using Netware 4 and above--you can get better network performance if you edit the config.ora file to set ORACLE_SAP to OFF.

Database Service and Address Storage in NDS

When the listener is started, it stores the database address in NDS under the OracleInstance object.


Note:

An NDS object for the Oracle database must have already been created. 


At that point, the address(es) is (are) accessible to the client from the NDS database

System Requirements

NDS external naming requires SQL*Net 2.2 or later and Oracle 7.2 or later. It can be used with any client running Novell libraries, but requires Netware 4.1 or later on the server.

Configuring Clients

Clients should be configured with the NDS external naming method and the NDS naming context.

To configure clients:

  1. Configure NDS 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 can use to reconcile services.

    1. Start Net8 Assistant:

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

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

    2. In the navigator pane, expand Local > Profile.

    3. From the list in the right pane, select Naming.

    4. Click the Methods tab.

    5. Select Novell from the Available Methods list, then click the right-arrow button.

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


  2. Configure a typeless or typed name with the NAMES.NDS.NAME_CONTEXT parameter in the sqlnet.ora file. This parameter specifies the naming context within the NDS tree where the database object resides. To specify a naming context:

    1. Click the External tab.

    2. Enter a naming context in the Name Context field.

      If the name of the database object is "Payroll.Finance.Oracle" and the naming context is Finance.Oracle, only "Payroll" needs to be specified in the connect string. "Payroll" is qualified to ".Payroll.Finance.Oracle". This is an example of a typeless name.


      Note:

      The leading dot designates this as a full NDS name. If you want to override the name context setting, then you can specify the full NDS name in the connect string by using a leading dot.  


      If the naming context is ou=Finance.o=Oracle, then the connect string would have to include a name of cn=Payroll.ou=Finance.o=Oracle. This is an example of a typed name.

      The name context in the sqlnet.ora file can override the "name context" entry in the client32net.cfg file. If no name context is specified in either file, it defaults to [root]. See the Novell client documentation for more information about the client32net.cfg file parameters.


      Note:

      The name context cannot contain a leading dot. This can result in an NDS error code of -309 (ERR_EXPECTED_IDENTIFIER):

      The parameter being parsed is not typed.
      
       

  3. Choose File > Save Network Configuration.

    The sqlnet.ora file updates with the following entries:

    names.directory_path=(novell, tnsnames, hostname)
    names.nds.name_context=Finance.Oracle
    

Configure the Server

To configure the Netware Server, use Net8 Easy Config application, as described in your Novell documentation.

Known Limitations

Following are some known limitations when using the NDS external naming:


Go to previous page Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index