8.2.1 Configure Net Service Name, Database Service, and Alias Entries

You can use Oracle Enterprise Manager Cloud Control and Oracle Net Manager to configure network service names, network service alias entries, and database service entries. Clients can use these entries to connect to the database.

  1. Verify Directory Compatibility:

    On the computer from which you plan to create network service names, do the following verification steps:

    1. Ensure the computer has the latest release of Oracle Net Services software. The release information is located in the About Net Manager option on the help menu.
    2. Run Oracle Internet Directory Configuration Assistant to verify directory server, Oracle Context, and Oracle schema releases.
  2. Create Net Service Names in the Directory:

    You can configure clients to use a network service name rather than the database service entry.

    Note:

    1. Access the Net Services Administration page in Oracle Enterprise Manager Cloud Control. See Accessing the Net Services Administration Page.
    2. Select Directory Naming from the Administer list, and then select the Oracle home that contains the location of the directory server.
    3. Click Go.

      The Directory Naming page appears.

    4. Click the Net Service Names tab.
    5. In the Results section, click Create.

      The Create Net Service Name page with the General tab appears.

    6. Enter a name in the Net Service Name field.
    7. In the Database Information section, configure service support, as follows:
      1. Enter a destination service name. See About Connect Descriptors.

      2. Select a database connection type. Oracle recommends that you use the Database Default for the connection type. If a shared server is configured in the initialization parameter file, then the following options are available:

        • Select Dedicated Server to force the listener to spawn a dedicated server, and bypass shared server configuration.

        • Select Shared Server to guarantee the connection always uses shared server.

        See Configuring a Shared Server Architecture.

    8. In the Addresses section, configure protocol support:
      1. Click Add.

        The Add Address page appears.

      2. From the Protocol list, select the protocol that the listener is configured to listen. This protocol must also be installed on the client.

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

        See Oracle Database Net Services Reference.

        Note:

        Optionally, you can specify LDAP parameters directly in the connect identifier, instead of configuring the sqlnet.ora file. See Specify LDAP Parameters Directly in a Connect Identifier.
      4. (Optional) In the Advanced Parameters section, specify the I/O buffer space limit for send and receive operations of sessions in the Total Send Buffer Size and Total Receive Buffer Size fields. See Configuring I/O Buffer Space.

      5. Click OK.

        The protocol address is added to the Addresses section.

    9. Click OK to add the network service name.

      The network service name is added to the Results section of the Net Service Names tab.

      See Creating a List of Listener Protocol Addresses to configure multiple protocol addresses. See About the Advanced Connect Data Parameters to configure additional CONNECT_DATA options.

  3. Create or Modify Connectivity Information for Database Service Entries:

    A database service entry is created during installation. When database registration with the directory naming completes, a database service entry is created in the directory. By default, this entry contains network route information with the location of the listener through a protocol address. You can re-create this information or modify the existing network route information.

    Note:

    Only users that are members of the OracleNetAdmins or OracleContextAdmins group can modify network information for a database service in a directory. To add or remove users from these groups, see Who Can Add or Modify Entries in the Directory Server.

    1. Access the Net Services Administration page in Oracle Enterprise Manager Cloud Control. See Accessing the Net Services Administration Page.
    2. Select Directory Naming from the Administer list, and then select the Oracle home that contains the location of the directory server.
    3. Click Go. You may be prompted to log in to the database server and the directory server.

      The Directory Naming page appears.

    4. Click the Database Services tab.
    5. In the Simple Search section, select Oracle Context and search criteria to see the network service names for Oracle Context.

      The database service names display in the Results section.

    6. In the Results section, select a database service, and then click Edit.
  4. Create Net Services Aliases:

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

    There are two main uses of network service aliases:

    • Use a network service alias as a way for clients to refer to a database service or network service name by another name.

    • Use a network service alias in one Oracle Context for a database service or network service name in a different Oracle Context. This enables a database service or network service name to be defined once in the directory server, and referred to by clients that use other Oracle Contexts. See Understanding Net Service Alias Entries for an overview of network service aliases.

    Note:

    • Only users that are members of either the OracleNetAdmins or OracleContextAdmins group can create or modify network service alias entries in a directory. To add or remove users from the OracleNetAdmins group, see Who Can Add or Modify Entries in the Directory Server.

    • Net service aliases are not supported by Microsoft Active Directory.

    • Ensure the NLS_LANG environment variable is set for the clients when using network service aliases.

    To create a network service alias, use one of the following methods. Each method provides similar functionality:

    • Network Service Alias Configuration using Oracle Enterprise Manager Cloud Control

      The following procedure describes how to configure a network service alias using Oracle Enterprise Manager Cloud Control:

      1. Access the Net Services Administration page in Oracle Enterprise Manager Cloud Control. See Accessing the Net Services Administration Page.

      2. Select Directory Naming from the Administer list, and then select the Oracle home that contains the location of the directory server.

      3. Click Go.

        The Directory Naming page appears.

      4. Click the Net Service Aliases tab.

      5. In the Results section, click Create.

        The Create Net Service Alias page appears.

      6. Enter a name for the alias in the Net Service Alias Name field.

      7. In the Referenced Service Detail section, enter the following information in the fields:

        • Oracle Context: Select the Oracle Context of the database service or network service name from the list or enter one in the field.

        • Referenced Service Name: Select the DN of the database service or network service name.

      8. Click OK to add the network service alias.

        The network service alias is added to the Directory Naming page.

    • Network Service Alias Configuration using Oracle Net Manager

      The following procedure describes how to configure a network service alias using Oracle Net Manager:

      1. Start Oracle Net Manager. See Using Oracle Net Manager to Configure Oracle Net Services.

      2. In the navigator pane, select Service Naming from Directory.

      3. Select Aliases.

      4. Select Create from the Edit menu.

      5. Enter the network service alias in the Net Service Alias field.

      6. Select Oracle Context and name.

      7. Click Create.

      8. Select Save Network Configuration from the File menu.

  5. Configure LDAP as the First Naming Method for Client Lookups:

    Configure directory naming as the first method to be used in the NAMES.DIRECTORY_PATH parameter in the sqlnet.ora file. This parameter specifies the order of naming methods Oracle Net uses to resolve connect identifiers to connect descriptors.

    To configure LDAP as the first naming method you can use one of the following methods:

    • LDAP Configuration using Oracle Enterprise Manager Cloud Control

      The following procedure describes how to specify directory naming as the first naming method using Oracle Enterprise Manager Cloud Control:

      1. Access the Net Services Administration page in Oracle Enterprise Manager Cloud Control. See Accessing the Net Services Administration Page.

      2. Select Network Profile from the Administer list.

      3. Click Go.

      4. Select Naming Methods.

      5. Select LDAP from the Available Methods list.

      6. Click Move to move the selection to the Selected Methods list.

      7. Use the Promote button to move LDAP to the top of the list.

      8. Click OK.

    • LDAP Configuration using Oracle Net Manager

      The following procedure describes how to specify directory naming as the first naming method using Oracle Net Manager:

      1. Start Oracle Net Manager. See Using Oracle Net Manager to Configure Oracle Net Services.

      2. In the navigator pane, select Profile from the Local menu.

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

      4. Click the Methods tab.

      5. From the Available Methods list, select LDAP, and then click the right-arrow button.

      6. From the Selected Methods list, select LDAP, and then use the Promote button to move the selection to the top of the list.

      7. Select Save Network Configuration from the File menu.

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

        NAMES.DIRECTORY_PATH=(ldap, tnsnames, hostname)
  6. Configure the Listener:

    Ensure that the listener located on the server is configured to listen on the same protocol address configured for the network service name. By default, the listener is configured to listen on the TCP/IP protocol, port 1521. See Configuring and Administering Oracle Net Listener for listener configuration details.

  7. Connect to the Database:

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

    CONNECT username@connect_identifier
    

    Clients that are configured with a default directory entry that does not match the entry's directory location must use the entry's distinguished name or its fully-qualified name. See Understanding the Directory Information Tree for fully-qualified name usage.