Skip Headers

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

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

Go to previous page Go to next page
View PDF

10
Exporting Naming Data to a Directory Server

This chapter explains how to export data stored in a tnsnames.ora file or an Oracle Names server to an LDAP-compliant directory server.

This chapter contains these topics:

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.

The tasks to export data from a tnsnames.ora file are as follows:

Task 1: Create Structure in Directory Server

Task 2: Create Oracle Contexts

Task 3: Configure Directory Server Usage

Task 4: Export Objects To a Directory Server


Note:

These tasks assume that you have a directory server installed and running.


Task 1: Create Structure in Directory Server

In the directory server, create the directory information tree (DIT) with the structure in which you want to import net service names. Create the structure leading up to the top of the Oracle Context.

For example, if the tnsnames.ora file supports a domain structure acme.com and you want to replicate this domain in the directory, then create domain component entries of dc=com and dc=acme in the directory, as depicted in Figure 10-1.

Figure 10-1 acme.com in Directory Server

Text description of net81123.gif follows
Text description of the illustration net81123.gif


You can replicate the domain structure you currently use with tnsnames.ora, or you can develop an entirely different structure. Introducing an entirely different structure can change the way in which clients enter the net service name in the connect string. Therefore, Oracle Corporation recommends considering relative and absolute naming issues prior to changing the structure.

See Also:

Task 2: Create Oracle Contexts

Create an Oracle Context under each DIT location that you created in Task 1. The Oracle Context has a relative distinguished name (RDN) of cn=OracleContext. The Oracle Context stores network object entries, as well as other entries for other Oracle components. In Figure 10-2, cn=OracleContext is created under dc=acme,dc=com.

To create the Oracle Context, you must use Oracle Net Configuration Assistant. to create a DIT structure that looks similar to the one in Figure 10-2.

Figure 10-2 Oracle Context

Text description of net81122.gif follows
Text description of the illustration net81122.gif


See Also:

Task 3: Configure Directory Server Usage

If not already done as a part of creating the Oracle Contexts, configure the Oracle home for directory server usage. The Oracle home you configure should be the one that will perform the export.

See Also:

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

Task 4: Export Objects To a Directory Server

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

  1. Start Oracle Net Manager.

    See Also:

    "Starting Oracle Net Manager"

  2. If the tnsnames.ora file you want to export is not the one loaded into Oracle Net Manager, then use File > Open Network Configuration to select the tnsnames.ora file to export to the directory.
  3. Choose Command > Directory > Export Net Service Names from the menu bar.

    The Directory Server Migration Wizard starts.

  4. Click Next.

    If net service names with multiple domain were detected in the tnsnames.ora file, then the Select Domain page appears. Continue to Step 5.

    If the net service names are not domain qualified, the Select Net Service Names page appears. Skip to Step 6.

  5. Select the network domain whose net service names you want to export, and then click Next.

    The Select Net Service Names page appears.

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

    The Select Destination Context page appears.

  7. In the Select Destination Context page, perform the following:
    1. From the Directory Naming Context list, select the directory entry that contains the Oracle Context. The directory naming context is part of a directory subtree that contains one or more Oracle Contexts.
    2. From the Oracle Context list, select the Oracle Context to which you want to export the selected net service names.
    3. Click Next.

    The Directory Server Update page appears with the status of the export operation.

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

Exporting Network Objects from an Oracle Names Server

Database and alias objects stored in an Oracle Names server can be exported directly to a directory server or indirectly to an LDAP Data Interchange Format (LDIF) file, which can then be used to load the directory server. When exporting the database objects, only the address record (A.SMD) is exported. The address record contains the connect descriptor information for the database object. Database objects are exported as net service names. Aliases are exported as net service aliases.

Data is exported from a specified domain. Any subdomains within the region can

This section contains the following topics:

Client Release Restriction

Release 8.1.6 or Later Clients

New client installations with directory server usage configuration can use directory naming entries when the following tasks are completed:

  1. Data is exported to a directory server.
  2. Directory naming is selected as a naming method.

However, only clients that are upgraded to 9.2 can use net service alias entries.

To export data for newer client configurations, follow the procedure in "Exporting Data to a Directory Server".

Release 8.1.6 or Previous Clients

For release 8.1.6 or later clients without directory server usage or pre-release 8.1.6 clients that do not support directory naming, you have two configuration choices. You can:

To export data for older client configurations, follow the procedures in both "Exporting Data to a Directory Server" and "Configuring Oracle Names LDAP Proxy Servers".

Database Server Release Restrictions

To export global database links to a directory server, ensure that the database is release 2 (9.2). Otherwise, you must configure Oracle Names LDAP Proxy servers, as described in "Configuring Oracle Names LDAP Proxy Servers".

Exporting Data to a Directory Server

The tasks to export data from an Oracle Names server are as follows:

Task 1: Create Structure in Directory Server

Task 2: Create Oracle Contexts

Task 3: Configure Directory Server Usage

Task 4: Obtain List of Objects to Export

Task 5: Export Objects To a Directory Server


Note:

These tasks assume that a directory server is installed and running and the Oracle Names Control utility (namesctl) executable is release 9.2. You can also use a release 9.1, release 8.1.6 or release 8.1.7 namesctl executable to perform export tasks. However, the DUMP_ALIAS command is only available for release 9.2. In addition, instructions for using the DUMP_LDAP command differ from release 8i and release 9i releases.

If you are using release 8.1, see the Net8 Administrator's Guide for that release.


Task 1: Create Structure in Directory Server

In the directory server, create the DIT with the structure in which you want to import Oracle Names objects. Create the structure leading up to the top of the Oracle Context.

For example, if Oracle Names has a domain structure acme.com and you want to replicate this domain in the directory, then create domain component entries dc=com and dc=acme in the directory, as depicted in Figure 10-3.

Figure 10-3 acme.com in Directory Server

Text description of net81123.gif follows
Text description of the illustration net81123.gif


You can replicate the domain structure you currently use with Oracle Names, or you can develop an entirely different structure. Introducing an entirely different structure will change the way in which clients enter the connect identifier in the connect string. Therefore, Oracle Corporation recommends that you consider the relative and absolute naming issues prior to changing the structure.


Important:

If you plan to use Oracle Names LDAP Proxy servers that support multiple administrative regions, Oracle Corporation recommends mirroring the current Oracle Names domain structure in the directory DIT structure. Using a different structure may require modifying the topology defined for the Oracle Names LDAP Proxy servers. Support for topology modification is not currently provided. The following constitutes a topology change:

  • Addition or removal of any Oracle Names servers, as well as modification of an Oracle Names server's name or protocol address
  • Modification of domain definitions for an administrative region or its delegated administrative regions

See Also:

Task 2: Create Oracle Contexts

Create an Oracle Context with Oracle Net Configuration Assistant under each DIT location that you created in Task 1. The Oracle Context has a RDN of cn=OracleContext. Oracle Contexts may be required for the root domain and each of its delegated domains. If you are using Oracle Internet Directory, you can use the Oracle Context created at the root of the DIT structure. This root Oracle Context has a complete DN of dn:cn=OracleContext. For most deployments, you will need to create additional Oracle Contexts.

In Figure 10-4, cn=OracleContext is created under dc=acme,dc=com.

Figure 10-4 Oracle Context

Text description of net81122.gif follows
Text description of the illustration net81122.gif


See Also:

Task 3: Configure Directory Server Usage

If not already done as a part of creating the Oracle Contexts, configure the Oracle home for directory server usage. The Oracle home you configure should be the one that will perform the export.

See Also:

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

Task 4: Obtain List of Objects to Export

Determine the Oracle Names domain structure and the objects within that structure. The Oracle Names Control utility offers commands described in Table 10-1 to help you with this task.

Table 10-1  Oracle Names Control Utility Structural Commands
Command Description

LIST_DOMAINS

Lists all of the authoritative domains

See Also: LIST_DOMAINS command in Oracle9i Net Services Reference Guide

LIST_DELEGATED

Lists all of the delegated domains

See Also: LIST_DELEGATE command in Oracle9i Net Services Reference Guide

LIST_OBJECTS

Lists all of the authoritative network objects

See Also: LIST_OBJECTS command in Oracle9i Net Services Reference Guide

Task 5: Export Objects To a Directory Server

The Oracle Names Control utility enables you to export network objects from a domain into the directory server using the DUMP_LDAP and DUMP_ALIAS commands.

Use the DUMP_LDAP command to export names and addresses of database objects. Use the DUMP_ALIAS command to export net service aliases. You can export these objects directly to a directory server or indirectly to an LDIF file, which can then be used to the load the exported objects to the directory server.

To run the DUMP_LDAP and DUMP_ALIAS commands.

  1. Run the DUMP_LDAP command from an authoritative Oracle Name server for the domain.

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

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

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

    namesctl
    NAMESCTL> DUMP_LDAP [source] [destination] [options] {-f [filename]}
    
    
  2. Run the DUMP_ALIAS command:

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

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

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

    namesctl
    NAMESCTL> DUMP_ALIAS [source] [destination] [options] {-f [filename]}
    
See Also:

DUMP_LDAP and DUMP_ALIAS commands in Oracle9i Net Services Reference Guide for a description of the arguments


Note:

The generated LDIF file can later be loaded into the directory server with the ldapadd command or the ldapmodify command with the add option. See your directory server's vendor documentation for syntax usage.


If the directory server's DIT structure has been designed to match the current Oracle Names structure, review the following examples to understand how to export data. These examples demonstrate the use of the DUMP_LDAP command. These examples also can be applied to net services aliases, except the DUMP_ALIAS command must be used in place of the DUMP_LDAP command.

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

Figure 10-5 shows an Oracle Names domain structure of acme.com. It contains a database object called db. The DIT has been designed with domain entries that match the Oracle Names domain structure. With this DIT structure, db.acme.com can be exported to cn=OracleContext,dc=acme,dc=com.

Figure 10-5 Single Domain Export to the Same DIT Node

Text description of net81063.gif follows
Text description of the illustration net81063.gif


Either of the following syntaxes exports data from Oracle Names to the configured DIT structure:

NAMESCTL> DUMP_LDAP acme.com (dn:dc=acme,dc=com) -f sample.ldif
NAMESCTL> DUMP_LDAP acme.com -f sample.ldif

In the first line of syntax, the destination distinguished name (DN), excluding cn=OracleContext, is explicitly specified. It is not necessary to specify the destination DN, as shown in the second line of syntax, because the destination DIT structure is domain based and matches the domain model used in Oracle Names. Note that cn=OracleContext is automatically inserted.

The database object db is exported to cn=OracleContext,dc=acme,dc=com and has a DN location of 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 delegated domains in Oracle Names to a directory server that uses a similar DIT in one step rather than one domain at a time.

Figure 10-6 shows an Oracle Names structure that contains a root domain of acme.com and delegated domains of sales.acme.com and dev.acme.com. Database objects db, orders, and widgets reside in acme.com, sales.acme.com and dev.acme.com, respectively. The directory server's DIT is similar to the Oracle Names domain structure.

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

Text description of net81064.gif follows
Text description of the illustration net81064.gif


The following syntax exports data from the acme.com root domain and its delegated domains to the configured DIT structure:

NAMESCTL> DUMP_LDAP acme.com -R -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 server.

Database Object in Oracle Names New DN in Directory Server

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

Configuring Oracle Names LDAP Proxy Servers

If you are not ready to upgrade clients to a version that supports directory naming, you must use Oracle Names LDAP Proxy servers. Oracle Names LDAP Proxy servers enable these clients to look up data in the directory server.

Generally, client configurations do not require modification. However, if the directory server's DIT structure does not match the Oracle Names domain structure, you must also reconfigure the NAMES.DEFAULT_DOMAIN parameter in the sqlnet.ora file to point to the new domain structure.

See Also:

"Configuring a Default Domain for Clients" for instructions

The tasks to create Oracle Names LDAP Proxy servers are as follows:

Task 1: Upgrade Oracle Names Servers to 9i

Task 2: Start Oracle Names Servers

Task 3: Populate the Directory Server

Task 4: Configure Oracle Names Servers as Proxies

Task 5: Run the Oracle Names LDAP Proxy Servers

Task 1: Upgrade Oracle Names Servers to 9i

Upgrade all Oracle Names servers within a region to 9i. Releases prior to 9i do not support Oracle Names LDAP Proxy servers.

See Also:

Oracle9i Database Migration

Task 2: Start Oracle Names Servers

Start each of the Oracle Names servers to generate the cktop.ora file. Use either Oracle Net Manager or the Oracle Names Control utility.

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

From the command line, enter:

namesctl

NAMESCTL> START

Starting with release 9.0, an Oracle Names server creates a ckptop.ora file in $ORACLE_HOME/network/names on UNIX and ORACLE_HOME\network\names on Windows NT, or in the file specified by the names.ora file parameter NAMES.TOPOLOGY_CHECKPOINT_FILE. This file contains topology data that defines the domains in the administrative region and the Oracle Names servers that have authority for them. Specifically, topology data consists of definitions for all parent domains and Oracle Names servers in the region. The Oracle Names servers use this information to understand the structure of the domain tree.

Oracle Names LDAP Proxy servers require the generated ckptop.ora file. If the Oracle Names structure has multiple administrative regions, Oracle Corporation recommends mirroring the current Oracle Names domain structure in the directory DIT structure. Using a different structure may require modifying the topology defined for the Oracle Names LDAP Proxy servers. Support for topology modification is not currently supported. The following constitutes a topology change:

Task 3: Populate the Directory Server

If you have not already done so, populate the directory:

  1. Create the DIT in the directory structure.

    See Also:

    "Task 1: Create Structure in Directory Server"

  2. Create Oracle Contexts in the directory under the root domain and each of its delegated domains.

    See Also:

    "Configuring Directory Usage After Installation" for instructions on creating an Oracle Context

  3. Configure each Oracle Names server within a region with directory usage settings in the ldap.ora file.

    To do this, select the Select the directory server you want to use option in Oracle Net Configuration Assistant.

    See Also:

    Chapter 8, "Setting Up Directory Server Usage"

  4. Export data from Oracle Names under the appropriate Oracle Contexts in the directory server. Use either the procedure described in "Exporting Data to a Directory Server" or an alternate external method.

Task 4: Configure Oracle Names Servers as Proxies

Configure each Oracle Names server within a region to load directory server information from a specific DN.

To configure Oracle Names servers as proxy servers:

  1. Stop each Oracle Names server. Use either Oracle Net Manager or the Oracle Names Control utility.

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

    From the command line, enter:

    namesctl
    
    
    NAMESCTL> STOP
    
    
  2. Set the NAMES.ADMIN_REGION parameter in the names.ora file to the directory server's DN or read the directory server's DN from an LDIF input file.

    The syntax for an Oracle Names LDAP Proxy server to load the data from a directory server is as follows:

    NAMES.ADMIN_REGION=
     (REGION=
        (TYPE=ldap)
       [(USERID=user_dn)]
       [(PASSWORD=password)]
        [(HOST=host)]
        [(PORT=port)]
        [(TIMEOUT=time)]
       [(SUBTREE_LIST=]
         [(SUBTREE=(BASE=base_DN)[(SCOPE=sub|one))]
         [(SUBTREE=(BASE=base_DN)[(SCOPE=sub|one))]
       [)])
    
    
    

    Values from equivalent ldap.ora file parameters are used as defaults for the USER, HOST, and SUBTREE (with SCOPE=one) parameters.

Table 10-2 describes how to set the NAMES.ADMIN_REGION subparameters.

Table 10-2  Subparameters of the NAMES.ADMIN_REGION Parameter for LDAP
Subparameter Description

TYPE

Specify that the Oracle Names LDAP Proxy server is to load data directly from a directory server.

USERID

(Optional) This entry is necessary if data is restricted.

Specify a directory user with read privileges in the form of a DN. For example, c=us,o=acme,ou=admin,cn=scott is the DN for an administrator named Scott.

Note: Do not prefix the DN with dn:

PASSWORD

(Optional) This entry is required if data is restricted.

Specify the password for the directory user.

HOST

(Optional) Specify the directory server host name.

PORT

(Optional) Specify the listening TCP/IP port for the directory server.

TIMEOUT

(Optional) Specify the time limit in seconds that the Oracle Names LDAP Proxy server can spend performing a search of directory objects. This time limit cannot be greater than the time limit set for searches in the directory server. By default, the time limit is set to 10 seconds, which is sufficient for most searches.

See Also: "Increasing Search Size Limit" for instructions for increasing the time limit of ldapsearch

SUBTREE_LIST | SUBTREE

(Optional) Use the SUBTREE parameter to specify the DN. Use the SUBTREE_LIST parameter if there are multiple DNs. The SUBTREE parameter supports the following subparameters:

BASE--Specify a subtree location in the DIT from which the Oracle Names Proxy server should load data. The location is specified as a DN of a LDAP directory entry. The Oracle Names Proxy loads directory naming data from one or more Oracle Contexts located in the subtree following the entry specified.

Note: Do not prefix the DN with "dn:". For example, (BASE=dn:dc=com) is not acceptable.

SCOPE--Specifies where the Oracle Names Proxy server looks for directory data to load.

one (default) specifies that the Oracle Names Proxy server look only in one Oracle Context directly following the entry specified in the BASE parameter

sub specifies the Oracle Names Proxy server look in all the Oracle Contexts in the subtree following the entry specified in the BASE parameter.

The following example shows an Oracle Names LDAP Proxy server configured to load the data from an Oracle Context that is directly under the DN dc=acme,dc=com and all Oracle Contexts under the DN subtree dc=us,dc=acme,dc=com.

NAMES.ADMIN_REGION= 
 (REGION=
   (TYPE=LDAP)
    (HOST=ldap-server)
    (PORT=389)
    (SUBTREE_LIST=
       (SUBTREE=(BASE=dc=acme,dc=com))
       (SUBTREE=(BASE=dc=us,dc=acme,dc=com)(scope=sub))))

The syntax for an Oracle Names LDAP Proxy server to load the data from an LDIF file is as follows:

NAMES.ADMIN_REGION=
 (REGION=
    (TYPE=ldif)
   [(FILE=ldif_file)]))

Table 10-3 describes how to set the NAMES.ADMIN_REGION subparameters.

Table 10-3  Subparameters of the NAMES.ADMIN_REGION Parameter for LDIF
Subparameter Description

TYPE

Specify that the Oracle Names LDAP Proxy server is to use data from an LDIF file.

FILE

Specify the input LDIF file name.

See Also: Directory server vendor documentation for LDIF file creation information

The following example shows an Oracle Names LDAP Proxy server configured to load data from LDIF file onames.ldif.

NAMES.ADMIN_REGION= 
  (REGION= 
   (TYPE=LDIF)
   (FILE=/private/eminer/nn/9i/proxy/onames.ldif))

The following LDIF file excerpt shows a DN of cn=sales,cn=OracleContext,dc=acme,dc=com and cn=hr,cn=OracleContext,dc=acme,dc=com for net service names sales and hr.

dn: cn=sales,cn=OracleContext,dc=us,dc=acme,dc=com
objectclass: top
objectclass: orclNetService
cn: sales
orclNetDescString: 
(DESCRIPTION=(ADDRESS_
LIST=(ADDRESS=(PROTOCOL=tcp)(Host=sales-server)(Port=1521)))(CONNECT_
DATA=(SERVICE_NAME=sales.us.acme.com)))

dn: cn=hr,cn=OracleContext,dc=us,dc=acme,dc=com
objectclass: top
objectclass: orclNetService
cn: hr
orclNetDescString: 
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=TCP_
COMMUNITY)(PROTOCOL=tcp)(Host=hr-server)(Port=1521)))(CONNECT_DATA=(SERVICE_
NAME=hr.us.acme.com)))

The following LDIF file excerpt shows a DN of cn=mysales,cn=OracleContext,dc=acme,dc=com for net service alias mysales.

dn: cn=mysales,cn=oracleContext,dc=acme,dc=com
objectclass: top
objectclass: alias
objectclass: orclNetServiceAlias
cn: mysales
aliasedobjectname: cn=mysales,cn=OracleContext,dc=us,dc=acme,dc=com

Task 5: Run the Oracle Names LDAP Proxy Servers

Run each of the Oracle Names servers with the new configuration. Use either Oracle Net Manager or the Oracle Names Control utility.

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

From the command line, enter:

namesctl

NAMESCTL> START

See Also:

"Oracle Names LDAP Proxy Server Error Reporting" region load operation troubleshooting advice

Considerations for Dissimilar DIT Structures

If the directory server'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. These examples demonstrate the use of the DUMP_LDAP command. Examples 1 through 3 also can be applied to net service aliases, except the DUMP_ALIAS command must be used in place of the DUMP_LDAP command.

See Also:

"Considerations for Net Service Aliases" for limitations of the DUMP_ALIAS command

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

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

Figure 10-7 Single Domain Export to One DIT Node

Text description of net81065.gif follows
Text description of the illustration net81065.gif


The following syntax exports data from the acme.com domain to the configured DIT structure:

NAMESCTL> DUMP_LDAP acme.com (dn:c=us,o=acme) -f sample.ldif

Because the DIT is different from the Oracle Names structure, the destination DN must be explicitly specified. cn=OracleContext is automatically pre-appended to the left of the destination DN; you do not need to explicitly specify cn=OracleContext in the DN.

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

Data can be exported from an Oracle Names administrative region to a directory server that uses a dissimilar DIT. RDNs in the destination DN must be specified without a value for the delegated domains.

Figure 10-8 shows an Oracle Names structure that contains a root domain of acme.com and delegated domains of sales.acme.com and dev.acme.com. Database objects of db, orders, and widgets reside in acme.com, sales.acme.com and dev.acme.com, respectively. The directory server's DIT has a top-level structure of o=acme,c=us that correlates to acme.com in Oracle Names. The subtrees, ou=sales and ou=dev, correlate to the sales.acme.com and dev.acme.com delegated domains in Oracle Names.

Figure 10-8 Root and Subdomain Domain Export to Dissimilar DIT

Text description of net81066.gif follows
Text description of the illustration net81066.gif


The following syntax exports data from the acme.com root domain and its delegated domains to the configured DIT structure:

NAMESCTL> DUMP_LDAP acme.com (dn:ou,o=acme,c=us) -R -f sample.ldif 

Note that organizational unit (ou) 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 server. All objects are exported to cn=OracleContext RDNs in the directory server.

Database Object in Oracle Names New DN in Directory Server

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, network objects in that subdomain would not be exported. This is because the destination DN template ou,o=acme,c=us permits only one level of delegated domains. In order to export objects from mktg.dept.acme.com, the following syntax would be required:

NAMESCTL> DUMP_LDAP acme.com (dn:ou,ou,o=acme,c=us) -f sample.ldif

This syntax enables up to two levels of delegated domains to be exported. By adding additional attributes, 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 10-9 shows an Oracle Names structure that contains a root domain of acme.com and delegated domains of sales.acme.com and dev.acme.com. Database objects of db, orders, and widgets reside in acme.com, sales.acme.com and dev.acme.com, respectively. The directory server's DIT has a structure of o=IS,c=uk that contains no subtrees that correlate to the Oracle Names delegated domains.

Figure 10-9 Root and Subdomain Domain Export to One DIT Node

Text description of net81067.gif follows
Text description of the illustration net81067.gif


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

NAMESCTL> DUMP_LDAP acme.com (dn:o=IS,c=uk) -R -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 server. All objects are exported to cn=OracleContext RDNs in the directory server.

Database Object in Oracle Names New DN in Directory Server

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 delegated domains contained a database object named db, it would not be exported. This is because the db database object's name would conflict 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 a DIT with a very different structure.

Figure 10-10 shows an Oracle Names structure that contains a root domain of acme.com and four delegated domains, each of which contains at least one database object. The directory server's 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 delegated domains in Oracle Names.

Figure 10-10 Multiple Domain Export to Two Subtrees

Text description of net81068.gif follows
Text description of the illustration net81068.gif


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

DUMP_LDAP IS.acme.com (dn:dc=intranet,dc=com,dc=acme) -f sample.ldif
DUMP_LDAP hr.acme.com (dn:dc=intranet,dc=com,dc=acme) -f sample.ldif
DUMP_LDAP warehouse.acme.com (dn:dc=storefront,dc=com,dc=acme) -f sample.ldif
DUMP_LDAP sales.acme.com (dn:dc=storefront,dc=com,dc=acme) -R -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. The -R option in the DUMP_LDAP sales.acme.com command enables the database 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 server. All objects are exported to cn=OracleContext RDNs in the directory server.

Database Object in Oracle Names New DN in Directory Server

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

Considerations for Net Service Aliases

Using the DUMP_ALIAS command is similar to the DUMP_LDAP command, except for the following limitations:

Figure 10-11 illustrates this point. It shows an Oracle Names structure with a root domain of acme.com that contains aliases of ordersalias, dbalias, and widgetsalias. These aliases reference objects orders.sales.acme.com, db.acme.com, and widgets.dev.acme.com, respectively. The directory's DIT structure is rearranged. Data that was in the sales domain is exported to marketing and data in dev is exported to RandD. However, the net services aliases remain in o=acme,c=us.

Figure 10-11 Unsupported Alias Export

Text description of net81134.gif follows
Text description of the illustration net81134.gif


The following syntax exports objects db, orders, and widgets:

NAMESCTL> DUMP_LDAP acme.com (dn:o=acme,c=us) -f sample.ldif
NAMESCTL> DUMP_LDAP dev.acme.com (dn:ou=RandD,o=acme,c=us) -f sample.ldif
NAMESCTL> DUMP_LDAP sales.acme.com (dn:ou=marketing,o=acme,c=us) -f sample.ldif

The following table shows how database objects in the Oracle Names domains are mapped to DNs in the directory server:

Database Object in Oracle Names New DN in Directory Server

db.acme.com

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

orders.sales.acme.com

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

widgets.dev.acme.com

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

The following command exports aliases ordersalias, dbalias, and widgetsalias and the data for the referenced objects to o=acme,c=us:

NAMESCTL> DUMP_ALIAS acme.com (dn:ou,o=acme,c=us) -R -f sample.ldif

The following table shows how aliases and data for reference objects are mapped to DNs in the directory server. It also describes what happens when a client attempts to look up of one of the net service aliases in the directory.

Alias Name Oracle Names Directory Server

dbalias

Alias Object Location in Oracle Names

dbalias.acme.com

Net Service Alias DN in Directory Server

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

Alias Data in Oracle Names

db.acme.com

Alias Data in Directory Server

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

Lookup Result with dbalias

Because the data of dbalias points to cn=db,cn=OracleContext,o=acme,c=us, the correct location of the object db, the net service alias works.

ordersalias

Alias Object Location in Oracle Names

ordersalias.acme.com

Net Service Alias DN in Directory Server

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

Alias Data in Oracle Names

orders.sales.acme.com

Alias Data in Directory Server

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

Lookup Result with ordersalias

Because the data of ordersalias points to cn=orders,cn=OracleContext,ou=sales,o=acme,c=us rather than cn=orders,cn=OracleContext,ou=marketing,o=acme,c=us, ordersalias fails to locate object orders.

widgetsalias

Alias Object Location in Oracle Names

widgetsalias.acme.com

Net Service Alias DN in Directory Server

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

Alias Data in Oracle Names

widgets.dev.acme.com

Alias Data in Directory Server

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

Lookup Result with widgetsalias

Because the data of widgetsalias points to cn=widgets,cn=OracleContext,ou=dev,o=acme,c=us rather than cn=widgets,cn=OracleContext,ou=RandD,o=acme,c=us, widgetsalias fails to locate object widgets.