Net8 Administrator's Guide Release 8.1.6 Part Number A76933-01 |
|
This chapter describes how to configure naming methods. This chapter includes the following sections:
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.
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.
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)))
Net8 configuration is based upon one of two models:
Net8 supports the following naming methods:
Naming Method | Description |
---|---|
Local Naming |
Stores net service names in a 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 |
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 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" |
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:
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:
Net8 Configuration Assistant prompts you to configure net service names in the tnsnames.ora
file to connect to an Oracle database service.
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.
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
To configure with the local naming method, use either one of the following tools:
To configure net service names in the tnsnames.ora
file with Net8 Assistant:
The Net Service Name Wizard starts.
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.
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.
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:
See Also:
To configure net service names in the tnsnames.ora
file with Net8 Configuration Assistant:
netca
from $ORACLE_HOME/bin
.
The Welcome page appears:
The Net Service Name Configuration page appears:
The Net Service Name Configuration, Database Version page appears:
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".
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:
The sqlnet.ora
file updates with the NAMES.DIRECTORY_PATH parameter, listing TNSNAMES first:
names.directory_path=(tnsnames, onames, hostname)
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.
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.
Clients can connect to the database using the following syntax:
CONNECT username/password@net_service_name
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:
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
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.
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.
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:
The administrative context is a directory entry that contains an Oracle Context (cn=OracleContext
). An Oracle Context is the root of a directory subtree under which all Oracle software relevant information is kept.
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:
cn=OracleDBCreators,cn=OracleContext
)
cn=OracleNetAdmins,cn=OracleContext
)
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:
|
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.
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.
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:
netca
at $ORACLE_HOME/bin
.
The Welcome page appears:
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:
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:
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:
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. |
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 |
To create a net service name in a directory server:
The Net Service Name Wizard starts.
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.
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:
See Also:
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:
The sqlnet.ora
file updates with the NAMES.DIRECTORY_PATH parameter, listing LDAP first:
names.directory_path=(ldap, tnsnames, onames, hostname)
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.
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:
|
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:
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:
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>
ldapmodify -h host -p port -D binddn
-w password -file ldif_file
To remove a user from the OracleNetAdmins group with ldapmodify:
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>
ldapmodify -h host -p port -D binddn
-w password -file ldif_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.
To export net service names contained in a tnsnames.ora
file to a directory:
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.
The Select Net Service Names page appears:
The Select Destination Context page appears:
The wizard exports the net service names:
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:
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.
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 |
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}
The syntax to export data directly to a directory is as follows:
NAMESCTLNAMESCTL> dump_ldap [
source
] [
destination
] [
options]
{-h host} {-p port} {-D user_dn} {-w password}
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:
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
:
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)
.
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.
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.
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:
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
.
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.
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.
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.
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.
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.
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.
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
.
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.
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.
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
Task 2: Install Necessary Components
Task 3: Create an Oracle Names Server
Task 4: Configure Clients and Database Servers To Use Oracle Names Servers
Task 5: Configure the Listener
Task 6: Register Data with the Oracle Names Server
Task 7: (Optional) Delegate Domains to Delegated Administrative Regions
Prior to creating an Oracle Names server, you must decide whether:
Ensure that the following are installed:
How an Oracle Names server is created depends upon how you want region data stored. You can have the data:
When information is added to an Oracle Names server, the information is stored in the database and in the Oracle Names server's cache files. If the database is unavailable, the information in the cache files is used.
The checkpoint files are stored in $ORACLE_HOME/network/names
on UNIX platforms and ORACLE_HOME
\network\names
on Windows NT:
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.
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.
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".
To store service data in an Oracle database, perform the following tasks:
To configure the database server:
SQL> CONNECT system/password
where password is MANAGER for the SYSTEM user account by default.
SQL> CREATE user user identified by password default tablespace users temporary tablespace temp;
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> CONNECTuser
/password
SQL> @oracle_home/network/admin/namesini.sql;
For each machine where Oracle Names is installed and where you want an Oracle Names server, create an Oracle Names server from Net8 Assistant.
The Names Wizard starts.
The wizard guides you through the creation and configuration process, prompting for:
If you choose TCP/IP, Oracle Corporation recommends using the default and officially registered port of 1575 for the Oracle Names server.
(Click "Use a region database".)
If you choose TCP/IP, Oracle Corporation recommends using the default and officially registered port of 1521 for the listener.
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.
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.se
rver_name=namesvr2.com #Oracle Names server listening protocol addressnames.addresses=
(address=(protocol=tcp
)(host=namesrv2-pc)(port=1575))[(address=...))]
#Database repository informationnames.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))
If you want the region to administer more than one domain, specify the additional domains in the NAMES.DOMAINS parameter with Net8 Assistant:
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)))
Start the Oracle Names server using either Net8 Assistant or the NAMESCTL control utility:
To replicate data among Oracle Names server in checkpointed files, perform these tasks:
For each machine where Oracle Names is installed and where you want an Oracle Names server, create an Oracle Names server from Net8 Assistant:
The Names Wizard starts.
The wizard guides you through the creation and configuration process, prompting you for:
If you choose TCP/IP, Oracle Corporation recommends using the default and officially registered port of 1575 for the Oracle Names server.
(Click "Don't use a region database".)
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.
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.
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.se
rver_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))
If you want the region to administer more than one domain, specify the additional domains in the NAMES.DOMAINS parameter with Net8 Assistant:
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)))
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:
To configure client and database server machines to use Oracle Names servers:
sqlnet.ora
file, as described in "Configuring Preferred Oracle Names Servers".
.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.
To create an .sdns.ora
file or an sdns.ora
file:
sqlnet.ora
file in the following manner:
The sqlnet.ora
file should contain an entry that lists ONAMES first in the NAMES.DIRECTORY_PATH parameter:
names.directory_path=(onames, tnsnames, hostname)
To add or configure these features:
Configure the listener with listening database protocol addresses if you are not using your operating system's primary protocol.
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:
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".
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... |
---|---|
|
Create and register a net service name with the Oracle Names server:
For example, to register a net service name of
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:
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... |
---|---|
|
Create and register a global database link with the Oracle Names server:
For example, to register a global database link of
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
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.
The Database Qualifier dialog box appears:
The link qualifier is added to the DB Qualifiers list box:
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;
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:
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... |
---|---|
|
Create and register an alias with the Oracle Names server:
See Also: Appendix B for more information about protocol syntax needed for address information
For example, to delegate domain
|
Clients can connect to the database using the following syntax:
CONNECT username/password@net_service_name
CONNECT username/password@database_service
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:
hosts
file
To configure the host naming method, perform these tasks:
Task 1: Configure the Listener with the Global Database Name
Task 2: Configure HOSTNAME as the First Naming Method
Task 3: Set Up Host Name Resolution Environment
The global database name must be registered with the listener. How this registration takes place depends upon the release of the database.
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".
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))
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:
The sqlnet.ora
file updates with the NAMES.DIRECTORY_PATH parameter, listing HOSTNAME first:
names.directory_path=(hostname, tnsnames)
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.
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.comIf the client and server are in the same domain of
us.acme.com
, the client needs to
enter only sales
in the connect string.
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:
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.
NIS External Naming requires SQL*Net 2.2 or greater.
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.
To add the tnsnames
map to the existing set of NIS maps:
tnsnames.ora
file, as specified in "Configuring the Local Naming Method".
tnsnames.ora
file to a tnsnames
map using the tns2nis
program.
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.
tnsnames
to the NIS server, if it is not already there.
tnsnames
map using makedbm
, which is an NIS program. Refer to your NIS documentation for more information.
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
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)))
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.
The sqlnet.ora
file updates with the NAMES.DIRECTORY_PATH parameter, listing NIS first:
names.directory_path=(nis, hostname, tnsnames)
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:
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.
There are three aspects to the server-side NDS External Naming:
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.
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.
When the listener is started, it stores the database address in NDS under the OracleInstance object.
At that point, the address(es) is (are) accessible to the client from the NDS database
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.
Clients should be configured with the NDS external naming method and the NDS naming context.
To configure clients:
sqlnet.ora
file. This parameter specifies the order of naming methods Net8 can use to reconcile services.
- On UNIX, run netasst
from $ORACLE_HOME/bin
.
- On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.
sqlnet.ora
file. This parameter specifies the naming context within the NDS tree where the database object resides. To specify a naming context:
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.
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.
The sqlnet.ora
file updates with the following entries:
names.directory_path=(novell, tnsnames, hostname) names.nds.name_context=Finance.Oracle
To configure the Netware Server, use Net8 Easy Config application, as described in your Novell documentation.
Following are some known limitations when using the NDS external naming:
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|