Skip Headers

Oracle Internet Directory Administrator's Guide
Release 9.2

Part Number A96574-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

22
Oracle Directory Replication Server Administration

Replication is the mechanism that maintains exact duplicates of specified naming contexts on multiple nodes. This chapter tells you how to install, configure, and manage replication in Oracle Internet Directory.


Note:

For Release 9.2, you can use Oracle Internet Directory replication only if you have installed Oracle9i Replication. This ships with all standalone purchases of Oracle Internet Directory and with Oracle9i Enterprise Edition. Oracle9i Replication is not included with Oracle9i Standard Edition.


This chapter contains these topics:

Installing and Configuring Replication

This section describes how to install and initialize directory replication server software on a node.

Each node in a group of directory servers holds an updatable copy, also called an updatable replica, of the same naming context or set of naming contexts. These naming contexts are synchronized with each other by replication processing. This group of nodes is called a directory replication group (DRG).

If you are deploying more than one Oracle Internet Directory instance on the same machine, then you cannot uniquely identify each directory server instance by the name of its host. In this case, before installing and configuring replication, follow the instructions in "Identifying a Node as Independent of Its Host".

To install and configure a replication group, perform these general tasks:

Task 1: Install Oracle Internet Directory on All Nodes in the DRG

Task 2: Decide Which Node Will Serve as the Oracle9i Replication Master Definition Site (MDS)

Task 3: Set Up Oracle9i Replication for a Directory Replication Group

Task 4: Load Data into the Directory

Task 5: Start Oracle Directory Server Instances on All the Nodes

Task 6: Start the Replication Servers on All Nodes in the DRG

Task 7: Test Directory Replication


Note:
  • The instructions in this section apply to setting up replication in a group of empty nodes. They assume that there is no pre-existing directory data on any of the nodes in the DRG. For instructions on adding a node to an existing DRG, see "Adding a Replication Node".
  • In Oracle Internet Directory Release 9.2, procedures and tools are not available to create an environment (directory network) consisting of more than one DRG.
  • The directory replication server does not always preserve the spaces between RDN components in the DN during entry replication. In some rare cases, it may not preserve the case of the letters in the DN.
  • DSE root-specific data, server configuration data, and replication agreement data are not included in the data replicated between servers in a directory replication group.

Task 1: Install Oracle Internet Directory on All Nodes in the DRG

Note that the typical installation of the Oracle9i Enterprise Edition, which is required for the Oracle Internet Directory, includes Oracle9i Replication. By contrast, a typical installation of Oracle9i Standard Edition does not include Oracle9i Replication.


Note:

During installation, be sure that each Oracle Internet Directory database instance name is unique on each machine.


See Also:

Installation documentation for Oracle Internet Directory

Task 2: Decide Which Node Will Serve as the Oracle9i Replication Master Definition Site (MDS)

A master definition site (MDS) is any of the Oracle Internet Directory databases in which the administrator is going to run the configuration scripts. A remote master site (RMS) is any site other than the MDS that participates in Oracle9i Replication.

You must be able to use Oracle Net Services to connect to the MDS database and all other nodes that constitute the DRG.

Task 3: Set Up Oracle9i Replication for a Directory Replication Group

The following sections lead you through installing and configuring Oracle9i Replication through Oracle Internet Directory installation scripts. More advanced Oracle9i Replication users may prefer to configure Oracle9i Replication through the Oracle9i Replication Manager Tool.

See Also:

Oracle9i Replication in the Oracle Database Documentation Library, and the online help for Oracle9i Replication Manager, for information on configuring Oracle9i Replication by using the Oracle9i Replication Manager

To configure the Oracle9i Replication environment to establish a directory replication group (DRG), perform the tasks discussed in these topics:

On All Nodes, Prepare the Oracle Net Services Environment for Replication

Follow these steps, described more fully in this section, on all nodes in the directory replication group to prepare the Oracle Net Services environment:

  1. Configure sqlnet.ora.
  2. Configure tnsnames.ora.
  3. Optional: Create rollback table space and rollback segments.
  4. Required only if you created rollback table space and rollback segments.
  5. Stop and restart the listener.
  6. Required only if you created rollback table space and rollback segments.
  7. IMPORTANT: Test Oracle Net connections to all nodes from each node in the DRG.

To prepare the Oracle Net Services environment for replication:

  1. Configure sqlnet.ora.

    The sqlnet.ora file should contain the following parameters at minimum:

    names.directory_path = (TNSNAMES)
    names.default_domain = domain

    On UNIX, this file is in $ORACLE_HOME/network/admin

    On Windows NT, this file is in ORACLE_HOME\network\admin

  2. Configure tnsnames.ora.

    Define all Oracle Internet Directory database instances in the DRG on all nodes in the DRG. The tnsnames.ora file must contain connect descriptor information in the following format for all Oracle Internet Directory databases:

    net_service_name =
        (DESCRIPTION =
          (ADDRESS = 
             (PROTOCOL = TCP)
             (HOST = HOST_NAME_OR_IP_ADDRESS)
             (PORT = 1521))
          (CONNECT_DATA = 
             (service_name = service_name)))

    On UNIX, this file is in $ORACLE_HOME/network/admin

    On Windows NT, this file is in ORACLE_HOME\network\admin


    Note:

    You must domain-qualify the net service name (for example, sales.com), but be sure that the domain component matches the one specified in the NAMES.DEFAULT_DOMAIN parameter in the sqlnet.ora file.


  1. Optional: Create rollback table space and rollback segments.

    You may want to create multiple rollback segments. You can increase the size of the table spaces and segments to meet your system requirements.

    1. Create a tablespace for rollback segments.

      Execute SQL*Plus by typing the following command:

      sqlplus system/system_password@net_service_name

      At the SQL*Plus prompt, type:

      CREATE TABLESPACE table_space_name 
      datafile file_name_with_full_path SIZE 50M REUSE AUTOEXTEND ON NEXT 
      10M MAXSIZE max_bulk_update transaction_size ex:500M;
      
      
      
    2. Create rollback segments.

      At the SQL*Plus prompt, type the following lines for each rollback segment:

      CREATE ROLLBACK SEGMENT rollback_segment_name
      tablespace table_space_name storage (INITIAL 1M NEXT 1M OPTIMAL 2M 
      MAXEXTENTS UNLIMITED);
      
      
      

      Repeat the CREATE ROLLBACK SEGMENT command for each rollback segment entered in the initialization parameter file.

  2. Required only if you created rollback table space and rollback segments.

    Modify the parameters in the initialization parameter file, init.ora.

    Type the following lines in the initialization parameter file:

    rollback_segments = (rollback_segment_name_1, rollback_segment_name_2 ...)
    SHARED_POOL_SIZE = 20000000
    
    

    Ensure that the total System Global Area (SGA) does not exceed 50% of your system's physical memory.

  3. Stop and restart the listener.

    To stop the listener for the Oracle Internet Directory database, use the listener control utility (lsnrctl). Type the following command at the LSNRCTL command prompt:

    SET PASSWORD password
    STOP [listener_name]

    SET PASSWORD is required only if the password is set in the listener.ora file. The password defaults to ORACLE. The default listener name is LISTENER.

    To restart the listener for the Oracle Internet Directory database, type the following command at the LSNRCTL command prompt:

    START [listener_name]
  4. IF you created rollback table space and rollback segments, then stop and restart the Oracle Internet Directory database.

    To stop and restart the Oracle Internet Directory database, you can use SQL*Plus.

    See Also:

    1. IMPORTANT: Test Oracle Net connections to all nodes from each node in the DRG.

      Use SQL*Plus. Test both internal@net_service_name and internal@net_service_name.domain. If this does not work, then replication will not work.

    From the MDS, Configure Oracle9i Replication For Directory Replication

    To configure Oracle9i Replication for the replication group, complete the following steps from the MDS:

    1. Log on as the Oracle Internet Directory software owner account from a UNIX prompt.
    2. Change to the following directory:
      • On UNIX: $ORACLE_HOME/ldap/bin
      • On Windows NT: ORACLE_HOME\ldap\bin


        Note:

        Before proceeding to the next step, connect as the system user on all nodes, including the MDS, from the MDS console. Ensure the following:

        • The Oracle Internet Directory database is up and running
        • The Oracle Internet Directory listener is up and running
        • The connect descriptor is correct
        • The system password is correct

    1. From the MDS, verify that all Oracle Internet Directory database instances and listeners are running on all nodes in the DRG.
    2. From the MDS, at the command prompt, run the following script if the prerequisites in the Note are met:
      ldaprepl.sh -asrsetup
      

      Note:
      • On UNIX, before running this script in the command shell, set the $ORACLE_HOME environment variable.
      • On Windows NT, you can run this script only if the MKS Toolkit or the Cygwin UNIX emulation tool is installed.

    The ldaprepl.sh script executes a number of operations.

    • It configures the MDS.
    • It configures the remote master sites.
    • It configures replication push jobs at all sites.
    • It resumes replication at the MDS.
    • It verifies that all steps have completed successfully.
    • It configures the default replication agreement on all nodes.

    As the script runs, it asks for the information in the following table, first for the MDS.

    Requested Information Definition

    MDS Global Name

    Net service name of the MDS database, as listed in the file tnsnames.ora

    System password for MDS

    System password for the Master Definition Site

    After you have provided this information for the MDS, the script asks you for the global names and system passwords of any other master sites.

    After you have provided the necessary information for the other master sites, the script asks you for the replication administration password. This enables it to create the database account for the replication administrator on all the nodes. The replication administrator needs this password later when adding or deleting nodes.

    Once you have identified all sites, the script shows a table of the information you have provided, and asks for confirmation. If it is not correct, then press N. The script then starts again at the beginning, asking about the MDS again.

    After you have provided all the information, the script asks you to verify the information. If the information is correct and you press Y, then the script begins configuring the sites.

    This process may take a long time, depending on your system resources and the number of nodes in your DRG. The script keeps you informed of its progress.


    Note:

    If you interrupt the process before it is complete, then you must start at the beginning. Interrupting the process does not negatively affect your re-installation.

    If errors arise, see Troubleshooting Replication Setup.


    See Also:

    Task 4: Load Data into the Directory

    If you have a small number of entries to add to the DRG, you can wait until you have completely configured the DRG, then use ldapadd to load the data to one of the nodes. The entries will then be replicated to the other nodes at the specified time.

    If you have a large amount of data to load into the DRG, then use the bulkload utility. To do this:

    1. On any of the nodes, enter:
      bulkload.sh -connect net_service_name -check -generate file_with_absolute_
      path_name
      
      
    2. From the same node, enter:
      bulkload.sh -connect net_service_name_1 -load
      
      
    3. Repeat Step 2, each time replacing net_service_name_1 with the net service name of another node in the DRG, until you have loaded the data onto all the nodes. For example, enter:
      bulkload.sh -connect net_service_name_2 -load
      
      

      then enter:

      bulkload.sh -connect net_service_name_3 -load
      
      

      and so on, until you have bulkloaded the data onto each node in the DRG.


      Note:

      To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:


      See Also:

    Task 5: Start Oracle Directory Server Instances on All the Nodes

    To start Oracle directory server instances on all nodes, run the following command:

    oidctl connect=net_service_name server=oidldapd instance=instance_number_of_
    ldap_server flags='-p port' start
    
    

    Be sure that the change logging option for the directory server is set to the default, namely, TRUE.


    Note:

    The instance_number_of_ldap_server need not be unique across the entire DRG. For example, you can have instance=1 on both node A on node B.


    See Also:

    Chapter 3, "Preliminary Tasks and Information" for more information on starting an Oracle directory server instance.

    Task 6: Start the Replication Servers on All Nodes in the DRG

    To start replication servers on all nodes, type the following command:

    oidctl connect=net_service_name server=oidrepld instance=1
    flags='-h host_name_of_this_computer -p port' start

    Note that the instance number does not need to be unique across the entire DRG.

    See Also:

    Chapter 5, "Oracle Directory Server Administration" for information on starting the replication servers

    You can turn off the multimaster flag, which occurs in the directory replication server, by changing the value of the -m flag in the OID Control Utility command for Oracle directory server from the default, namely, TRUE, to FALSE. This is useful for reducing performance overhead if you are deploying a single master with read-only replica consumers. The multimaster option controls conflict resolution, which serves no purpose if you are deploying a single master.

    See Also:

    "Conflict Resolution in Replication"


    Note:

    As part of Task 3, the ldaprepl script set normal defaults enabling you to simply start the replication servers. If you wish to alter these defaults, see Managing Replication .


    Task 7: Test Directory Replication

    Use Oracle Directory Manager to verify that the directory replication servers are running, then test directory replication by doing the following:

    1. Log in to Oracle Directory Manager as orcladmin.
    2. In the navigator pane, expand Oracle Internet Directory Servers > directory_server_instance > Entry Management.
    3. Create a single entry on the MDS node.

      The identical entry appears in approximately 1 to 10 minutes on the RMS. You can adjust the timing in the replication server configuration set entry. If entries are modified on any nodes in the DRG, then the changes will be replicated.

    Managing Replication

    Once you have installed and configured replication, you have the option of modifying the default parameters for server configuration and replication agreements. Replication agreements are entries that list the member nodes (in a replication group) that share their changes. Replication agreements are referenced by replication server configuration parameters that load when the directory replication server runs.

    Directory replication server configuration parameters are stored as special attributes in directory entries. You can configure replication parameters and replication agreements the same way you configure the Oracle Internet Directory. You can do either of the following:

    • Use Oracle Directory Manager to view and modify configuration entries and agreement entries, as described and,
    • Use command-line tools, such as ldapadd and ldapmodify, to alter the configuration and agreement entries, as described and.


      Note:

      No change to any configuration parameter or replication agreement takes effect until the replication server is restarted.


    This section explains both approaches and contains the following topics:

    Modifying Directory Replication Server Configuration Parameters

    The directory replication server configuration parameters are stored in the replication server configuration set entry, which has the following DN:

    cn=configset0,cn=osdrepld,cn=subconfigsubentry
    
    

    This entry contains replication attributes that control replication processing. You can modify some of these attributes. Note that the orclDirReplGroupAgreement attribute contains a replication agreement identifier. In this release, only one replication agreement is possible.

    Table 22-1 lists and describes the directory replication server configuration parameters.

    Table 22-1  Directory Replication Server Configuration Parameters
    Parameter name Description Default Values Modifiable?

    modifyTimestamp

    Time of entry creation or modification

    No

    modifiersName

    Name of person creating or modifying the entry

    No

    orclChangeRetryCount

    Single-valued attribute. The number of processing retry attempts for a change-entry before being moved to the human intervention queue. The value for this parameter must be equal to or greater than 1 (one).

    10

    Yes

    orclPurgeSchedule

    Single-valued attribute. Specifies purge (garbage collection) interval in minutes. Removes entries that are already applied or have been dropped as candidate changes. This thread is initiated periodically based on the frequency that you set. The value for this parameter must be equal to or greater than 1 (one).

    10 minutes

    Yes

    orclThreadsPerSupplier

    Number of worker threads directory replication server provides for each supplier for change log processing. The value for this parameter must be equal to or greater than 1 (one).

    5

    Yes

    orclDirReplGroupAgreement

    Multi-valued attribute. Identifies the symmetrical replication agreements for which this server is responsible.

    orclagreementid=000001,
    cn=orclreplagreements

    No

    orclChangeLogLife

    Single-valued attribute. Specifies in hours the time for the life of entries in the change log store. 0 (zero) indicates that this is a change number-based purge.

    See Also: "Change Log Purging"

    0

    Yes

    Viewing and Modifying Replication Configuration Parameters by Using Oracle Directory Manager

    To view and modify replication configuration parameters:

    1. In the navigator pane, expand Oracle Internet Directory > directory_server_instance > Server Management > Replication Server.
    2. Select the replication configuration set whose parameters you want to view or modify. The corresponding tab pages appear in the right pane.


      Note:

      No change to any configuration parameter or replication agreement takes effect until the replication server is restarted.


      Configuration parameters appear in the General tab page. Use this tab page to view replication configuration parameters, and modify many of them. The following table describes the fields in this tab page.

      Field Description

      Modify Timestamp

      Time of entry creation or modification in UTC (Coordinated Universal Time). You cannot modify this parameter.

      Modifier's Name

      Name of person creating or modifying the entry. You cannot modify this parameter.

      Change Retry Count

      Type the number of attempts that the conflict resolution process tries to apply each update before giving up and logging the incident. The default is 10.

      Purge Schedule

      Type the number of minutes in between garbage collections. The replication garbage collection thread removes entries that are already applied or have been dropped as candidate changes. The default is 10.

      Number of Threads Per Supplier

      Type the number of worker threads the directory replication server provides for each supplier for change log processing. The default is 5.

      Set

      Type the configuration identifier.

      Change Log Life

      Type the number of hours for the life of the change log objects.

      See Also: "Change Log Purging"

    Modifying Replication Configuration Parameters by Using Command-Line Tools

    To modify replication configuration parameters by using command-line tools, use the syntax documented in "ldapmodify Syntax".

    Modifying the Garbage Collection Interval by Using ldapmodify

    This example uses an input file named mod.ldif to change the garbage collection interval from the default of 10 minutes to 30 minutes.

    1. Edit mod.ldif as follows:
      dn: cn=configset0,cn=osdrepld,cn=subconfigsubentry
      changetype: modify
      replace: orclPurgeSchedule
      orclPurgeSchedule: 30
    2. Use ldapmodify to update the replication server configset0 parameter value as follows:
      ldapmodify -h my_host -p 389 -f mod.ldif
    3. Restart the directory replication server.
    Modifying the Change Log Life Parameter by Using ldapmodify

    This example uses an input file named mod.ldif to change the change log life parameter to 10 hours:

    1. Edit mod.ldif as follows:
      dn: cn=configset0,cn=oidrepld,cn=subconfigsubentry
      changetype: modify
      replace: orclChangeLogLife
      orclChangeLogLife: 10
    2. Use ldapmodify to update the replication server configset0 parameter value as follows:
      ldapmodify -h my_host -p 389 -f mod.ldif
    3. Restart the directory replication server.
    Modifying the Number of Retries Before a Change Is Moved into the Purge Queue by Using ldapmodify

    This example uses an input file named mod.ldif to change the number of retry attempts from the default of ten times to five times. Specifically, after attempting to apply an update five times, the update is dropped and logged in the replication log.

    1. Edit mod.ldif as follows:
      dn: cn=configset0,cn=osdrepld,cn=subconfigsubentry
      changetype: modify 
      replace: orclChangeRetryCount
      orclChangeRetryCount: 5
    2. Use ldapmodify to update the replication server configset0 parameter value as follows:
      ldapmodify -h my_host -p 389 -f mod.ldif
    3. Restart the directory replication server.
    Modifying the Number of Worker Threads Used in Change Log Processing by Using ldapmodify

    This example uses an input file named mod.ldif to change the number of worker threads used in change log processing to 7:

    1. Edit mod.ldif as follows:
      dn: cn=configset0,cn=osdrepld,cn=subconfigsubentry 
      changetype: modify
      replace: orclthreadspersupplier
      orclthreadspersupplier: 7
    2. Use ldapmodify to update the replication server configset0 parameter value as follows:
      ldapmodify -h my_host -p 389 -f mod.ldif
    3. Restart the directory replication server.

      See Also:

      "Restarting Directory Server Instances" for instructions on restarting the directory replication server

    Modifying Replication Agreement Parameters

    Replication agreement parameters are stored in the replication agreement entries which have the following DN:

    orclAgreementID=id number,cn=orclreplagreements

    This entry contains attributes that pertain only to the nodes participating in this agreement. You can create multiple replication agreements to manage replication between reciprocating nodes, but you can reference only one of them in your start-server message by using Oracle Directory Manager. For Oracle Internet Directory Release 9.2, only one replication agreement can be used.

    In the parameter DirectoryReplicationGroupDSAs, type the host names for all of the nodes in the DRG. This list must be identical on all the nodes.


    Note:

    Before you modify replication agreement parameters, be sure that you have started the Oracle Internet Directory on all nodes.


    See Also:

    Viewing and Modifying Replication Agreement Parameters by Using Oracle Directory Manager

    To view and modify replication agreement parameters by using Oracle Directory Manager:

    1. In the navigator pane, expand Oracle Internet Directory Servers > directory_server_instance > Server Management > Replication Server, and select Default Configuration Set.
    2. In the right pane, select the Agreement tab to display the replication agreement.

      The fields in this tab page are described in the following table. You can view the parameters and modify some of them by double-clicking the attributes.

      Field Description Default Values Modifiable?

      Agreements ID

      Unique identifier for a replication agreement.

      000001

      No

      Excluded Naming Contexts

      Multivalued attribute. Specifies naming contexts excluded from this replication agreement. Changes to entries in these naming contexts sent from other replicas are not applied on the local node.

      None

      Yes

      Replication Group Nodes

      Multi-valued attribute. Specifies nodes participating in symmetrical replication agreement. Nodes that you specify here share updates with one another.

      Yes

      Update Schedule

      Replication update interval for new changes and those being retried. The value is in minutes.

      1

      Yes

      Orcl HIQSchedule

      Replication update interval for the human intervention queue. The value is in minutes. The value is typically higher that orclUpdateSchedule. This gives administrators time to change the DIT structures when retrying an update fails to resolve a conflict.

      10

      Yes

      Replication Protocol

      Specifies the replication protocol used in this replication agreement. The supported protocol is Oracle9i Replication.

      ODS_ASR_1.0

      No


      Note:

      Be sure to add all host names for all nodes in the DRG into the Replication Group Nodes field. Do this for all nodes in the DRG.


    3. If you want to return to the values that appeared when you first opened this pane, then click Revert. If you are satisfied with your changes, then click Apply.

    Modifying Replication Agreement Parameters by Using ldapmodify

    The following table lists and describes the replication agreement parameters.

    Parameter Description Default Values Modifiable?

    orclAgreementID

    Unique identifier for a replication agreement.

    000001

    No

    orclExcludedNamingcontexts

    Multi-valued attribute. Specifies naming contexts excluded from this replication agreement. Changes to entries in these naming contexts sent from other replicas are not applied on the local node.

    None

    Yes

    orclDirReplGroupDSAs

    Multi-valued attribute. Specifies nodes participating in symmetrical replication agreement. Nodes that you specify here share updates with one another.

    Yes

    orclUpdateSchedule

    Replication update interval for new changes and those being retried. The value is in minutes.

    1

    Yes

    OrclHIQSchedule

    Replication update interval for the human intervention queue. The value is in minutes. The value is typically higher that orclUpdateSchedule. This gives administrators time to change the DIT structures when retrying an update fails to resolve a conflict.

    10

    Yes

    orclReplicationProtocol

    Specifies the replication protocol used in this replication agreement. The supported protocol is Oracle9i Replication.

    ODS_ASR_1.0

    No

    To add more nodes to the values in a replication agreement entry, run ldapmodify at the command line, referencing an LDIF-formatted file.

    This example uses an input file named mod.ldif to add two nodes to a replication agreement:

    1. Edit mod.ldif as follows:
      dn: orclagreementid=000001,cn=orclreplagreements
      changetype: modify 
      add: orcldirreplgroupdsas
      orcldirreplgroupdsas: hollis
      orcldirreplgroupdsas: eastsun-11
    2. Use ldapmodify to update the replication server configset0 parameter value as follows:
      ldapmodify -h host -p port -f mod.ldif
    3. Restart the directory replication server.

    This procedure modifies the entry containing the replication agreement whose DN is orclagreementid=000001,cn=orclreplagreements. The input file adds the two nodes, hollis and eastsun-11, into the replication group governed by oraclagreementid 000001.


    Note:

    You must include the new nodes--for example, hollis and eastsun-11 in the previous sample LDIF file--in the orclDirReplGroupDSAs parameter on each node in the replicated environment before you start the replication process.

    "Adding a Replication Node" explains the process of adding a new node to a replication environment.


    Because Oracle Internet Directory Release 9.2 supports only one configuration set for directory replication server, you do not need to specify a configuration set.

    Changing the Replication Administrator's Password on All Nodes

    The Oracle9i Replication administrator can change the password for administering Oracle9i Replication on all nodes by using the -chgpaswd utility. To launch this utility, enter:

    ldaprepl.sh -chgpswd
    
    

    The -chgpswd utility prompts you for the MDS Global Name--that is, the name of the Master Definition Site--the current password, and the new password. It then asks you to confirm the new password. If you enter an incorrect current password, then the -chgpswd utility asks you to enter it again, up to three times.

    Adding a Replication Node

    There are two ways to add a new node to a live replication group.

    • Using ldifwrite

      This method, described in this section, is the easier of the two. The process can be fully automated, and the generated file can be used for partial replication. Use this procedure unless your directory is very large. Backup using this method can take up to seven hours for a directory with one million entries.

    • Using cold backup

      This method, described in Chapter 23, "Addition of a Node by Using the Database Copy Procedure", cannot be fully automated and cannot be reused for partial replication. However, cold backup takes much less time for a large directory server. For example, if your directory has more than a million entries, then use this method.

    Before you add a replication node:

    • Prepare the Oracle Net Services environment as described in "On All Nodes, Prepare the Oracle Net Services Environment for Replication".
    • Be sure that there is no pre-existing data on the new node. Any pre-existing data will not be replicated to the other participants in the directory replication group (DRG). To replicate pre-existing data:
      1. Extract the data to an LDIF file by using ldapsearch with the -L option.
      2. Delete all exported entries from the new node.
      3. After the new node is added to the DRG and can replicate new data to the other nodes, reload the exported data by using ldapadd.

    To add a replication node to a functioning DRG of any significant size, follow these general steps, each of which is more fully described later in this chapter.

    Task 1: Stop the Directory Replication Server on All Nodes

    Task 2: Identify a Sponsor Node and Switch the Sponsor Node to Read-Only Mode

    Task 3: Backup the Sponsor Node by Using ldifwrite

    Task 4: Perform Oracle9i Replication Add Node Setup

    Task 5: Switch the Sponsor Node to Updatable Mode

    Task 6: Start the Directory Replication Server on All Nodes Except the New Node

    Task 7: Load Data into the New Node by Using bulkload

    Task 8: Start LDAP Server on the New Node

    Task 9: Start the Directory Replication Server on the New Node


    Note:

    Commands shown in the following tasks require the following types of items to be stored as follows:

    • Binaries: $ORACLE_HOME/bin
    • SQL scripts: $ORACLE_HOME/ldap/admin
    • UNIX scripts: $ORACLE_HOME/ldap/bin

    Before beginning "Task 1: Install Oracle Internet Directory on All Nodes in the DRG", be sure that all three of these types of items are in the path.


    Task 1: Stop the Directory Replication Server on All Nodes

    To stop the directory replication server, run the following command on each node in the LDAP replication group:

    oidctl connect=db_connect_string server=oidrepld instance=1 stop
    

    Note:

    The instance number may not be 1. Check the running process to discover the instance number in use here.


    Task 2: Identify a Sponsor Node and Switch the Sponsor Node to Read-Only Mode

    A sponsor node is one that will supply the data to the new node. To identify a sponsor node and switch it to read-only mode:

    1. Create a new file, change_mode.ldif, containing the following:
      dn:
      changetype: modify
      replace: orclservermode
      orclservermode: r
      
      
      
    2. Run the following commands against the identified sponsor node:
      ldapmodify -D "cn=orcladmin" -w welcome -h host_name_of_sponsor_node    
      -p port -f change_mode.ldif oidctl connect=net_service_name server=oidldapd restart

    This restarts all running Oracle directory servers on the sponsor node in Read-Only mode. It takes approximately fifteen seconds for a directory server to restart.


    Note:

    While the sponsor node is in read-only mode, you may not make any updates to it. You may, however, update any of the other nodes, but those updates are not replicated immediately.

    Also, the sponsor node and the MDS may be the same node.


    Task 3: Backup the Sponsor Node by Using ldifwrite

    Because this may take a long time, you may start "Task 4: Perform Oracle9i Replication Add Node Setup" while backup is in process.

    Enter the following command:

    ldifwrite -c db_connect_string -b "" -f output_ldif_file
    
    

    Task 4: Perform Oracle9i Replication Add Node Setup

    You can perform this task at the same time as you are performing "Task 3: Backup the Sponsor Node by Using ldifwrite".

    From the sponsor node, run the following script:

    ldaprepl.sh -addnode

    This script executes a number of operations.

    • It quiesces Oracle9i Replication at the sponsor node and any other existing master site.
    • It configures the master sites and the new node. A master site is any site other than the sponsor node that participates in LDAP replication.
    • It configures replication push jobs at all sites including the new node.
    • It checks that all steps have completed successfully. (This may take a long time.)
    • It performs post-add-node operation.

    As the script runs, it asks for the information in Table 22-2, first for the sponsor node then for the existing master sites.

    Table 22-2  ldaprepl.sh Requested Information
    Requested Information Definition

    MDS Global Name

    Net service name of the MDS database, as listed in the file tnsnames.ora

    System password for MDS

    System password for the Master Definition Site

    When you have identified all the existing master sites, enter N. The script then asks for the global name of the node you want to add, the system password for that node, and the replication administrator's database account password. Once you have provided that information, the script shows you a table of the information you have provided, and asks for confirmation.

    If the information is not correct, then press N. The script then starts again at the beginning, asking the same information. If the information is correct and you enter Y, then the script begins configuring the sites.

    This process can take a long time, depending on your system resources and the size of your DRG. The script keeps you informed of its progress.


    Note:

    If for any reason you must interrupt the process before it is complete, then you must start from the beginning.

    If errors arise, see Troubleshooting Replication Setup


    Task 5: Switch the Sponsor Node to Updatable Mode

    To switch the sponsor node to updatable mode:

    1. Edit change_mode.ldif to the following:
      dn: 
      changetype: modify
      replace: orclservermode
      orclservermode: rw
      
      
      
    2. Run the following commands on the sponsor node:
      ldapmodify -D "cn=orcladmin" -w welcome -h host_name_of_sponsor_node
      -p port -f change_mode.ldif oidctl connect=net_service_name server=oidldapd restart

      Note:

      Task 6 is very similar to Task 3. The only difference is that the orclservermode parameter in change_mode.ldif is being set back to rw, that is, read/write, in this step.


    Task 6: Start the Directory Replication Server on All Nodes Except the New Node

    To start the directory replication server, type the following command:

    oidctl connect=db_connection_string server=oidrepld instance=1
    flags='-h host -p port' start

    Verify that no directory or replication processes are running on the new node.

    Task 7: Load Data into the New Node by Using bulkload

    To load data, type the following command:

    bulkload.sh -connect db_connect_string_of_new_node -generate -load
    -restore absolute_path_to_the_ldif_file_generated_by_ldifwrite

    Note:

    To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:


    Task 8: Start LDAP Server on the New Node

    To start the LDAP server, type the following command:

    oidctl connect=db_connect_string_of_new_node server=oidldapd
    instance=1 flags='-p port' start

    Task 9: Start the Directory Replication Server on the New Node


    Note:

    If you need to change configuration or agreement parameters, see Managing Replication.


    To start the directory replication server, type the following command:

    oidctl connect=db_connect_string_of_new_node server=oidrepld instance=1
    flags='-h host_name_of_new_node -p port' start

    Note:

    Once a directory server instance is participating in a replication agreement, do not use bulkload.sh to add data into the node. Instead, use ldapadd.


    Deleting a Replication Node

    At times, you may want to delete a node from a DRG. For example, if the addition of a new node did not fully succeed as a result of system errors, then you need to delete that node.

    You can delete a replication node from a DRG only if there are more than two nodes in the DRG.

    To delete a replication node from a directory with fewer than a million entries, perform these tasks, each of which is more fully described in this section.

    Task 1: Stop the Directory Replication Server on All Nodes

    Task 2: Stop All Processes in the Node to be Deleted

    Task 3: Delete the Node from the Master Definition Site

    Task 4: Start the Directory Replication Server on All Nodes


    Note:

    Commands shown in the following tasks require that the following variables be stored in the corresponding directories:

    • Binaries: $ORACLE_HOME/bin
    • SQL scripts: $ORACLE_HOME/ldap/admin
    • UNIX scripts: $ORACLE_HOME/ldap/bin

    Before beginning Task 1, be sure that all three variables are in the path.


    Task 1: Stop the Directory Replication Server on All Nodes

    To stop the directory replication server, run the following command on each node in the DRG:

    oidctl connect=net_service_name server=oidrepld instance=1 stop
    

    Note:

    The instance number may vary.


    Task 2: Stop All Processes in the Node to be Deleted

    Stop the OID Control Utility and the OID Monitor.

    See Also:

    Task 3: Delete the Node from the Master Definition Site

    From the MDS, run the following script:

    ldaprepl.sh -delnode
    

    Note:

    To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:


    This script executes these operations:

    • It quiesces Oracle9i Replication at the MDS and every other existing master site.
    • It deletes the node from the Directory Replication Group.
    • It verifies that all steps have completed successfully.

    As the script runs, it asks for the global name of the MDS, the global name of the node you want to delete, and the replication administrator's password. Once you have provided that information, the script shows you a table of the information you have provided, and asks for confirmation. If the information is not correct, then press N. The script then starts again at the beginning, asking the same information. If the information is correct and you enter Y, then the script begins configuring the sites.

    This process can take a long time, depending on your system resources and the size of your DRG. The script keeps you informed of its progress.


    Note:

    If, for any reason, you must interrupt the process before it is complete, then you must start from the beginning.


    Task 4: Start the Directory Replication Server on All Nodes

    To start the directory replication server, type the following command:

    oidctl connect=net_service_name server=oidrepld instance=1
    flags='-h host -p port' start

    Resolving Conflicts Manually

    This section contains these topics:

    Monitoring Replication Change Conflicts

    If a conflict has been written into the log, then it means that the system is not able to resolve it by following its resolution procedure. To avoid further replication change conflicts arising from earlier unapplied changes, it is important to monitor the logs regularly.

    To monitor replication change conflicts, examine the contents of the replication log. You can distinguish between messages by their respective timestamps.

    Examples of Conflict Resolution Messages

    Conflict resolution messages, examples of which are shown in this section, are logged in the file oidrepld00.log. The path for this file is ORACLE_HOME/ldap/log. The result of each attempt to resolve the replication conflict is displayed at the end of each conflict resolution message.

    Example 1: An Attempt to Modify a Non-Existent Entry

    2000/08/03::10:59:05:  ************ Conflict Resolution Message ************
    2000/08/03::10:59:05:  Conflict reason: Attempted to modify a non-existent 
    entry.
    2000/08/03::10:59:05:  Change number:1306.
    2000/08/03::10:59:05:  Supplier:eastlab-sun.
    2000/08/03::10:59:05:  Change type:Modify.
    2000/08/03::10:59:05:  Target 
    DN:cn=ccc,ou=Recruiting,ou=HR,ou=Americas,o=IMC,c=US.
    2000/08/03::10:59:05:  Result: Change moved to low priority queue after failing 
    on 10th retry.
    

    Example 2: An Attempt to Add an Existing Entry

    2000/08/03::10:59:05:  ************ Conflict Resolution Message ************
    2000/08/03::10:59:05:  Conflict reason: Attempted to add an existing entry.
    2000/08/03::10:59:05:  Change number:1209.
    2000/08/03::10:59:05:  Supplier:eastlab-sun.
    2000/08/03::10:59:05:  Change type:Add.
    2000/08/03::10:59:05:  Target DN:cn=Lou Smith, ou=Recruiting, ou=HR, 
    ou=Americas, o=IMC, c=US.
    2000/08/03::10:59:05:  Result: Deleted duplicated target entry which was created 
    later than the change entry. Apply the change entry again.
    

    Example 3: An Attempt to Delete a Non-Existent Entry

    2000/08/03::10:59:06:  ************ Conflict Resolution Message ************
    2000/08/03::10:59:06:  Conflict reason: Attempted to delete a non-existent 
    entry.
    2000/08/03::10:59:06:  Change number:1365.
    2000/08/03::10:59:06:  Supplier:eastlab-sun.
    2000/08/03::10:59:06:  Change type:Delete.
    2000/08/03::10:59:06:  Target DN:cn=Lou 
    Smith,ou=recruiting,ou=hr,ou=americas,o=imc,c=us.
    2000/08/03::10:59:06:  Result: Change moved to low priority queue after failing 
    on 10th retry.
    

    Using the Human Intervention Queue Manipulation Tool

    The human intervention queue manipulation tool enables you to move the changes from the human intervention queue to either the retry queue or the purge queue. Moving the change to the purge queue means that there are no further attempts to re-apply the changelog entry. Perform the following general steps to address changes in the human intervention queue:

    1. Shutdown the directory replication server.
    2. Analyze the replication log.
    3. Use the human intervention queue manipulation tool to move the changes to either the retry queue or the purge queue as described in the following sections.

    Using the OID Reconciliation Tool

    When the directory replication server encounters inconsistent data, you can use the OID reconciliation tool to synchronize the entries on the consumer with those on the supplier. When you do this, perform the following general steps:

    1. Set the supplier and the consumer to read-only mode.
    2. Ensure that the supplier and the consumer are in tranquil state. If they are not in a tranquil state, then wait until they have finished updating.
    3. Identify the inconsistent entries or subtree on the consumer.
    4. Use the OID reconciliation tool to fix the inconsistent entries or subtree on the consumer.
    5. Set the participating supplier and consumer back to read/write mode.

      See Also:

      "The OID Reconciliation Tool" for syntax and an explanation of how OID reconciliation tool works.

    Identifying a Node as Independent of Its Host

    In most deployments, a node in a DRG is uniquely identified by the name of the host where Oracle Internet Directory is installed. However, when there are multiple installations of Oracle Internet Directory on the same host, the host name cannot be a unique node identifier. In this case, you should use the orclReplicaId attribute of the Root DSE.

    When you identify a node in a DRG by using orclReplicaId instead of the host name, follow the steps in this section.


    Note:

    Do not perform any updates on the nodes in the DRG until you have modified the orclReplicaId Root DSE attribute on all the nodes.


    1. On each node in the DRG, give the orclReplicaId a unique value. For example, if there are three nodes on the same computer, and the corresponding directory servers are running on port1, port2 and port3, then you would perform following modifications:
      ldapmodify -v -h host -p port1  << EOF
      dn:
      changetype: modify
      replace: orclreplicaid
      orclreplicaid : replica001
      
      ldapmodify -v -h host -p port2  << EOF
      dn:
      changetype: modify
      replace: orclreplicaid
      orclreplicaid : replica002
      
      ldapmodify -v -h host -p port3  << EOF
      dn:
      changetype: modify
      replace: orclreplicaid
      orclreplicaid : replica003
      
      
      
    2. After you have modified orclreplicaid on all the nodes, perform replication setup as described in "Installing and Configuring Replication".
    3. When you modify the DRG as described in "Modifying Replication Agreement Parameters by Using ldapmodify", give the orcldirreplgroupdsas attribute the same value you assigned to orclreplicaid. To use the previous example, you would give the orcldirreplgroupdsas attribute the values replica001, replica002, replica003.


      Note:

      Once you have set up replication, do not modify the orclreplicaId attribute.


    Troubleshooting Replication Setup

    If the replication setup fails, then do the following:

    1. Check the
      $ORACLE_HOME/ldap/admin/logs/ldaprepl.log file to see the status.
    2. Go to the directory $ORACLE_HOME/ldap/admin and check the status of replication jobs by running the following command:
      sqlplus system/password@net_service_name @ldaplogq.sql
      
      

      Run this command for each node in the DRG. Issuing this command should result in no rows being selected. If rows are selected containing the failed status and error messages, then this means that Oracle9i Replication set up failed. In this case, you may:


Go to previous page Go to next page
Oracle
Copyright © 1999, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback