Oracle Internet Directory Administrator's Guide
Release 2.1.1

Part Number A86101-01

Library

Product

Contents

Index

Go to previous page Go to next page

10
Managing Directory Replication

Replication is the mechanism that maintains exact duplicates of specified naming contexts on multiple nodes.


Note:

For release 2.1.1, you can use Oracle Internet Directory replication only if you have installed Advanced Symmetric Replication (ASR), which ships with all standalone purchases of Oracle Internet Directory and with Oracle8i Enterprise Edition. ASR is not included with Oracle8i Standard Edition. 


This chapter contains these topics:

Installing and Configuring Replication

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

Each node in a group of DSAs holds an updatable copy, also called an updatable replica, of the same 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).


Note:

The instructions in this section apply to setting up replication in a group of empty nodes. For instructions on adding a node to an existing DRG, see "Adding a Replication Node"


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

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

Note that the typical installation of the Oracle8i Enterprise Edition, which is required for the Oracle Internet Directory, includes Oracle Advanced Symmetric Replication (ASR). By contrast, a typical installation of Oracle8i Standard Edition does not include ASR.

See Also:

Installation documentation for Oracle Internet Directory 

Task 2: Decide Which Node Will Serve as the ASR 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 is any site other than the Master Definition Site that participates in ASR replication.

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

Task 3: At the MDS, Set Up ASR for a Directory Replication Group

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

See Also:

Oracle8i Server replication documentation and the online help for Oracle8i Replication Manager Tool for information on configuring ASR with the Oracle8i Replication Manager Tool 

Setting up the Oracle Advanced Symmetric Replication (ASR) environment to establish a Directory Replication Group (DRG) requires you to:

Prepare the Net8 Environment for Replication

Follow these steps, described more fully below, on all nodes in the Directory Replication Group to prepare the Net8 environment:

  1. Configure sqlnet.ora.

  2. Configure tnsnames.ora.

  3. Create rollback table space and rollback segments.

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

  5. Stop and restart the listener.

  6. Stop and restart the Oracle Internet Directory database.

To prepare the Net8 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

  1. Configure tnsnames.ora.

    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 may domain-qualify the net service name (for example, sales.com). Regardless of your choice, be sure that the domain component matches the one specified in the NAMES.DEFAULT_DOMAIN parameter in the sqlnet.ora file. 


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

      a. 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;
       
      
       
      b. 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.

      4. 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 ...)
      JOB_QUEUE_PROCESSES = a_minimum_of_total_number_of_LDAP_nodes_minus_one
      SHARED_POOL_SIZE = 20000000
      OPEN_LINKS = a_minimum_of_total_number_of_LDAP_nodes_minus_one
      


      Note:

      When setting the number of job queue processes, consider using a number high enough to accommodate any nodes you may want to add in the future. 


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


      Note:

      Every time a database is started, a System Global Area (SGA) is allocated and Oracle background processes are started. The SGA is an area of memory used for database information shared by the database users. The combination of the background processes and memory buffers is called an Oracle instance. 


      5. 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]
      6. Stop and restart the Oracle Internet Directory database.

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

      See Also:

       

      Configure Oracle ASR For Directory Replication

      To configure ASR 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:

      Task 4: 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
      


      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 5, "Managing an Oracle Directory Server" for more information on starting an Oracle directory server instance 

      Task 5: Configure Replication

      You need to configure parameters for:

      Oracle directory replication server 

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

      • View and modify the agreements by using Oracle Directory Manager

      • Alter the contents of the configuration entries and agreement entries through the command line tools, such as ldapadd and ldapmodify

      This section explains both approaches. 

      Replication agreements 

      Replication agreements are entries that list the member nodes within a replication group that share their changes. Replication agreements are referenced by Oracle directory replication server configuration parameters that load when the Oracle directory replication server runs.  


      Important:

      When you install and configure replication for the first time, you must inform the Oracle directory replication server about the existence of the member nodes in the replication agreement. To do this, modify the orclDirReplGroupDSAs attribute in the replication agreement. See "Replication Agreement Parameters" for more information. 


      Location of Oracle Directory Replication Server Configuration Parameters

      The Oracle 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.

      Oracle Directory Replication Server Parameters

      The next table lists and describes the Oracle 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 dropped. 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 Oracle 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). 

      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" 

      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, then select the replication configuration set whose parameters you want to view or modify. The corresponding tab pages appear in the right pane.

        Configuration parameters appear in the General tab page. You can 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 Oracle 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 host -p port -f mod.ldif
      3. Restart the Oracle 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:

      1. Edit mod.ldif as follows:

        dn: cn=configset0,cn=oidrepld,cn=subconfigsubentry
        changetype: modify
        replace: orclChangeLogLife
        orclChangeLogLife: 10 hours
      2. Use ldapmodify to update the replication server configset0 parameter value as follows:

        ldapmodify -h host -p port -f mod.ldif
      3. Restart the Oracle 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 host -p port -f mod.ldif
      3. Restart the Oracle 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:

      1. Edit mod.ldif as follows:

        dn: cn=configset0,cn=osdrepld,cn=subconfigsubentry 
        changetype: modify
        replace: orclthreadspersupplier
        orclthreadspersupplier: new_number_of_worker_threads
      2. Use ldapmodify to update the replication server configset0 parameter value as follows:

        ldapmodify -h host -p port -f mod.ldif
      3. Restart the Oracle directory replication server.

      Replication Agreement Parameters

      In the parameter DirectoryReplicationGroupDSAs, type all of the host names of the DSAs in the DRG. Be sure that this information is identical on all the nodes.

      Location of 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 2.1.1, only one replication agreement can be used.

      The following table lists and describes the replication agreement parameters.


      Note:

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


      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 in Oracle Directory Manager  Description


         
        Default Values

         
        Modifiable?


         

        Agreements ID 

        Unique identifier for a replication agreement. 

        000001 

        No 

        Excluded Naming Contexts 

        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 

        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. 

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

        ODS_ASR_1.0 

        No 

      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. 

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

      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 Oracle 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 above 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 2.1.1 supports only one configuration set for Oracle directory replication server, you do not need to specify a configuration set.

      Task 6: Start the Replication Servers on All the Nodes

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

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

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

      See Also:

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

      Using the Change Log Flag

      You can turn off change logging, which occurs in the Oracle directory server, by using the default value of the -l flag in the OID Control Utility command for Oracle directory server from true to false. This is useful if you suspect that the change log file might not be emptying. However, turning change logging off on a given node means that updates on that node cannot be replicated to other nodes in the DRG.

      Using the Multimaster Flag

      You can turn off the multimaster flag, which occurs in the Oracle directory replication server, by using the default value of the -m flag in the OID Control Utility command for Oracle directory server from 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.

      Adding a Replication Node

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

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

      Task 1: Stop the Oracle Directory Replication Server on All Nodes

      To stop the Oracle 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: Configure the New Node into the LDAP Replication Group on All the Existing Nodes

      The following example creates an LDIF file, add_node.ldif, and configures it into the replication group on all the existing nodes.

      dn: orclagreementid=000001,cn=orclreplagreements
      changetype: modify 
      replace: orcldirreplgroupdsas
      orcldirreplgroupdsas: host_name_of_the_new_node
      orcldirreplgroupdsas: host_name_of_existing_node_1
      orcldirreplgroupdsas: host_name_of_existing_node_2
      .
      .
      .
      orcldirreplgroupdsas: host_name_of_existing_node_n
      
      
      
      

      Run the following command against each node in the LDAP replication group:

      ldapmodify -h host_name_of_the_node -p port -f add_node.ldif
      


      Note:

      This command can be run from one work station for all nodes. 


      Task 3: 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 4: Backup the Sponsor Node by Using ldifwrite

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

    Enter the following command:

    ldifwrite -c db_connect_string -b "" -f output_ldif_file

    Task 5: Perform ASR Add Node Setup

    You can perform this task at the same time as you are performing "Task 4: 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 ASR at the sponsor node and other existing master sites.

    • 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 10-1, first for the sponsor node then for the existing master sites.

    Table 10-1 ASR Setup Information
    Information   Description 

    Host Name of sponsor node 

    Name of the computer 

    Global name 

    Net service name of the MDS or master site database, as listed in tnsnames.ora 

    system password 

    system password 

    When you have identified all the existing master sites, enter N. The script then asks for information regarding the new node. 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. 



    Troubleshooting Tip:

    If the process 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 status [failed] and error messages, then this means that ASR set up failed. In this case, you may:

    • Run the script from the beginning

    • Consult the troubleshooting chapter in Oracle8i Replication

    • Determine a solution from error message information by consulting an expert in Advanced Symmetric Replication (ASR)

     

    Task 6: 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 7: Start the Oracle Directory Replication Server on All Nodes Except the New Node

    To start the Oracle 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 8: 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

    Task 9: 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 10: Configure the LDAP Replication Agreement on the New Node

    Run the following command against the new node:

    ldapmodify -h host_name_of_the_new_node -p port -f add_node.ldif
    

    Task 11: Start the Oracle Directory Replication Server on the New Node

    To start the Oracle 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

    Deleting a Replication 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, follow these steps, each of which is more fully described later.

    Task 1: Stop the Oracle Directory Replication Server on All Nodes

    To stop the Oracle 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

    This script executes these operations:

    • It quiesces ASR at the MDS and other existing master sites.

    • It deletes the node from the orclDirReplGroupDSAs parameter.

    • It verifies that all steps have completed successfully.

    As the script runs, it asks for the information in Table 10-2, first for the Master Definition Site then for the node to be deleted.

    Table 10-2 ASR Setup Information
    Information   Description 

    Host Name of MDS or master site 

    Name of the computer 

    Global name 

    Net service name of the MDS or master site database, as listed in tnsnames.ora 

    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. 



    Troubleshooting Tip:

    If the process 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 status [failed] and error messages, then this means that ASR set up failed. In this case, you may:

    • Run the script from the beginning

    • Consult the troubleshooting chapter in Oracle8i Replication,

    • Determine a solution from error message information by consulting an expert in Advanced Symmetric Replication (ASR)

     

    Task 4: Start the Oracle Directory Replication Server on All Nodes

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

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

    Task 5: Delete the Node from the Replication Group

    Before deleting the node from the replication group, be sure that all of its changes have been applied to the other nodes.

    The following example creates an LDIF file, delete_node.ldif, and configures it into the replication group on all the existing nodes. Notice that this LDIF file does not include the host name of the node to be deleted.

    dn: orclagreementid=000001,cn=orclreplagreements
    changetype: modify 
    replace: orcldirreplgroupdsas
    orcldirreplgroupdsas: host_name_of_existing_node1
    orcldirreplgroupdsas: host_name_of_existing_node2
    .
    .
    .
    orcldirreplgroupdsas: host_name_of_existing_node_n

    Run the following command against each node in the LDAP replication group:

    ldapmodify -h host_name_of_the_node -p port -f delete_node.ldif
    

    Task 6: Restart the Oracle Directory Replication Server on the Remaining Nodes

    After deleting the node, restart the Oracle directory replication server on the remaining nodes for greater efficiency. To do this, type the following command:

    oidctl connect=db_connection_string server=oidrepld instance=1
    flags="-h host -p port" restart

    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 below, 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 Oracle 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.

    Moving a Change from the Human Intervention Queue into the Retry Queue

    To place a change back into the retry queue, use this syntax:

    hiqretry.sh -connect net_service_name [-start change_number] 
    [-end change_number] [-equal change_number] -supplier supplier_node

    The arguments are:

    Argument  Description 

    -connect net_service_name 

    Connects to the database using the net service name defined in the tnsnames.ora file 

    -start change_number 

    Specifies the start change number for the retry operation. If you skip this option, then the command moves all the changes with change numbers less than or equal to the specified end change number back to the retry queue. 

    -end change_number 

    Specifies the end change number for the retry operation. If you skip this option, then the command moves all the changes with change numbers greater than or equal to the specified start change number back to the retry queue. 

    -equal change_number 

    Specifies the change number. The command moves the exact change conflict back to the retry queue. This option should not be present when -start or -end is used.  

    -supplier supplier_node 

    Specifies the supplier node where the changes originate 

    Moving a Change from the Human Intervention Queue into the Purge Queue

    To place a change into the purge queue, use this syntax:

    hiqpurge.sh -connect net_service_name [-start change_number] [-end change_
    number] [-equal change_number] -supplier supplier_node

    Arguments are:

    Argument  Description 

    -connect net_service_name 

    Connects to the database using the net service name defined in the tnsnames.ora file 

    -start change_number 

    Specifies the start change number for the purge operation. If you skip this option, then the command moves all the changes with change numbers less or equal to the specified end change number back to the purge queue. 

    -end change_number 

    Specifies the end change number for the purge operation. If you skip this option, then the command moves all the changes with change numbers greater or equal to the specified start change number back to the purge queue. 

    -equal change_number 

    Specifies the change number of the change. The command moves the exact change conflict back to the purge queue. This option should not be present when -start or -end is used. 

    -supplier supplier_node 

    Specifies the supplier node where the changes originate 


    Note:

    When using hiqretry.sh or hiqpurge.sh, if you do not want all changes to be moved, then you must supply either the -equal flag, or a combination of the -start and -end flags. 


    Examples: Using the Human Intervention Queue Manipulation Tool

    The following examples illustrate how to use the human intervention queue manipulation tool.

    Example: Retrying and Discarding Changes

    Suppose that, after analyzing the replication log, you decide to do the following:

    • Retry changes coming from the supplier node, ldap_rep1, with change numbers between 10324 to 10579

    • Discard changes with change numbers between 10581 to 10623.

    To do this, you issue these two commands:

    hiqretry.sh -connect oiddb1 -start 10324 -end 10579 -supplier ldap_rep1 
    hiqpurge.sh -connect oiddb1 -start 10581 -end 10623 -supplier ldap_repl
    
    

    The first command moves changes originating in ldap_rep1 with change numbers from 10324 to 10579 back to the retry queue. The second command deletes changes that originate in the supplier ldap_repl and that have change numbers from 10581 to 10623.

    Example: Moving a Single Change from the Human Intervention Queue to the Retry Queue

    The following command moves the change with change number equal to 10519 back to the retry queue.

    hiqretry.sh -connect oiddb1 -equal 10519 -supplier ldap_repl
    
    Example: Moving a Group of Changes from the Human Intervention Queue to the Retry Queue

    The following command moves all the changes with change number greater or equal to 10324 back to the retry queue.

    hiqretry.sh -connect oiddb1 -start 10324 -supplier ldap_repl
    
    

    The following command moves all the changes with change numbers less than or equal to 10579 back to the retry queue.

    hiqretry.sh -connect oiddb1 -end 10579 -supplier ldap_repl
    
    Example: Moving All Changes from the Human Intervention Queue to the Retry Queue

    The following command includes no options. It moves all changes that originate in the supplier ldap_repl from the Human Intervention Queue to the retry queue.

    hiqretry.sh -connect oiddb1 -supplier ldap_repl
    

    Using the OID Reconciliation Tool

    When the Oracle 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.

    Reconciling Inconsistent Data by Using the OID Reconciliation Tool

    The OID reconciliation tool uses this syntax:

    oidreconcile -h supplier_host -c consumer_host [-P supplier_port] [-p consumer_
    port] [-s scope] -b basedn -W supplier_password -w consumer_password [-T thread]
    

    Argument  Description 

    -h supplier_host 

    Supplier host. This can be a computer name or IP address. 

    -c consumer_host 

    Consumer host. This can be a computer name or IP address. 

    -P supplier_port 

    Supplier TCP port. If you do not specify this option, then the tool connects to the default port (389). 

    -p consumer_port 

    Consumer TCP port. If you do not specify this option, then the tool connects to the default port (389). 

    -s scope 

    Reconcile scope: subtree 

    -b basedn 

    Specifies the distinguished name of the entry on which to perform reconciliation. 

    -W supplier_password 

    The password of cn=orcladmin of the supplier node 

    -w consumer_password 

    The password of cn=orcladmin of the consumer node 

    -T thread 

    Worker thread 

    How the OID Reconciliation Tool Works

    When the OID reconciliation tool receives the specified DN, it compares the orclGuid of the parent DN on both the supplier and the consumer.

    If the global identification (orclGuid) of both parents match, and the option -s subtree is set, then the OID reconciliation tool does the following:

    1. Deletes all the entries in the subtree on the consumer node

    2. Replaces them with entries from the supplier node

    For example, the following command replaces the whole subtree starting from "ou=hr,o=acme,c=us" on the consumer with the equivalent subtree on the supplier:

    oidreconcile -h supplier_host -P 389 -c consumer_host -p 389 -b 
    "ou=hr,o=acme,c=us" -s subtree -W supplier_password -w consumer_password
    
    

    If the global identification (orclGuid) of both parents ("o=acme,c=us") match, and -s subtree is not set, then the OID reconciliation tool replaces only the entry itself on the consumer node with the specified entry from the supplier node.

    For example, the following command, in which the option "-s subtree" is not set, replaces only the specified entry, "ou=hr,o=acme,c=us".

    oidreconcile -h supplier -P 389 -c consumer -p 389 -b "ou=hr, o=acme, c=us" 
    -W supplier_password -w consumer_password

    Figure 10-1 helps to explain how this process works.

    Figure 10-1 Example: OID Reconciliation Tool Process


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

    This figure shows two DITs, one on a supplier node and one on a consumer node. In the DIT on the supplier node, the orclGuid for c=us is 1 (one), the orclGuid for o=acme is 10, and the orclGuid for ou=st is 15. On the consumer node, the orclGuid for o=acme is 5, and the orclGuid for ou=st is 7.

    The orclGuids for the parent of o=acme,c=us--namely, c=us--on both the supplier and the consumer match. Therefore, the following command replaces all entries under o=acme,c=us on the consumer with the corresponding ones on supplier:

    oidreconcile -h supplier -c consumer -b "o=acme, c=us" -s subtree -W supplier_
    password -w consumer_password

    If the orclGuid of both parents does not match, then the OID reconciliation tool does not perform the reconciliation. Instead, it tells the user the first ancestor on the consumer in which the orclGuid matches that of the same ancestor on the supplier.

    For example, in Figure 10-1, suppose you were to run the following command:

    oidreconcile -h supplier -c consumer -b "ou=st, o=acme, c=us" -s subtree 
    -W supplier_password -w consumer_password

    As a result of this command, you would receive a message that the first ancestor of ou=st in which the orclGuids match is o=acme,c=us. This message means that you should use o=acme,c=us as basedn argument to oidreconcile.


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

All Rights Reserved.

Library

Product

Contents

Index