Skip Headers
Oracle® Internet Directory Administrator's Guide,
10g Release 2 (10.1.2)
B14082-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

I Addition of a Directory Node by Using the Database Copy Procedure

This appendix explains how to add a new node to an existing replicating system by using the database copy procedure, also known as cold backup. This procedure works only for Oracle Internet Directory. Do not employ this procedure if other Oracle Identity Management components, such as Oracle Application Server Certificate Authority or Oracle Application Server Single Sign-On, are installed. You can use the database copy procedure, to create a new Directory Replication Group if you have a standalone Oracle Internet Directory node. This procedure is applicable only for Oracle Database Advanced Replication-based directory replication.

This chapter contains these topics:

I.1 Definitions

The sponsor site refers to the site or host or node where Oracle Internet Directory and its repository, the Oracle database, are installed. The sponsor site is also referred to as sponsor node.

The new site refers to the site or host or node to which you are copying the Oracle Internet Directory repository. The new site is also referred to as new node.

I.2 Prerequisites

Your computing environment must meet the following prerequisites before you start this procedure:

  1. The operating system, version, and patch level of the new directory site must be the same as that of the sponsor directory site. This procedure might not work if the patch level of the operating system differs.

  2. Oracle Corporation strongly recommends that you back up the sponsor directory's repository before you employ this procedure.

  3. Because this procedure involves copying Oracle data files, performance depends on the underlying network. If the underlying network is slow, it might be more efficient to use the method described in Chapter 25, "Oracle Internet Directory Replication Administration" to set up a replication group. Alternatively, you could physically transfer compressed Oracle data files on removable media. Consult your local system or network administrator for information about the network.

  4. Only a person familiar with the Oracle database should implement this procedure.

I.3 Sponsor Directory Site Environment

In the example shown throughout this chapter, the sponsor directory site's environment is as follows:

Hostname = rst-sun
Domain name = acme.com
ORACLE_BASE = /private/oracle/app/oracle
ORACLE_HOME = /private/oracle/app/oracle/product/OraHome_1
ORACLE_SID  = LDAP
LD_LIBRARY_PATH = $ORACLE_HOME/lib
NLS_LANG    = AMERICAN_AMERICA.AL32UTF8 
datafile location = /private/oracle/oradata/LDAP
Dump destination =  /private/oracle/app/oracle/admin/LDAP/pfile,
                    /private/oracle/app/oracle/admin/LDAP/bdump,
                    /private/oracle/app/oracle/admin/LDAP/cdump, 
                    /private/oracle/app/oracle/admin/LDAP/udump,
                    /private/oracle/app/oracle/admin/LDAP/create

I.4 New Directory Site Environment

In the example shown throughout this chapter, the new directory site's environment is as follows:

Hostname = dsm-sun
Domain name = acme.com
ORACLE_BASE = /private1/oracle/app/oracle
ORACLE_HOME = /private1/oracle/app/oracle/product/OraHome_1
ORACLE_SID  = NLDAP
LD_LIBRARY_PATH = $ORACLE_HOME/lib
NLS_LANG = AMERICAN_AMERICA.UTF8
datafile location = /private1/oracle/oradata/NLDAP
Dump destination =  /private1/oracle/app/oracle/admin/NLDAP/pfile,
                    /private1/oracle/app/oracle/admin/NLDAP/bdump,
                    /private1/oracle/app/oracle/admin/NLDAP/cdump, 
                    /private1/oracle/app/oracle/admin/NLDAP/udump,
                    /private1/oracle/app/oracle/admin/NLDAP/create
 

I.5 Tasks To Be Performed on the New Node

Complete the following steps on the new node:

  1. Log in to the new node, dsm-sun.

  2. Install Identity Management and Metadata Repository using Oracle Universal Installer. You need to install only Oracle Internet Directory, so select only Oracle Internet Directory in the Select Configuration Options screen of the installer. During the installation process, set ORACLE_SID to NLDAP and global name to NLDAP.ACME.COM.


    See Also:

    "Installing OracleAS Infrastructure" in Oracle Application Server Installation Guide.

  3. Issue the following command to copy all install-specific entries to sponsor directory:

    remtool -backupmetadata \
       -master "sponsor_host:master_port/sponsor_repl_dn_pwd" \
       –replica "new_node_host:new_node_port/new_node_repldn_pwd"
    
    

    where sponsor_host, sponsor_port, and sponsor_repdn_pwd are the hostname, port number, and replication DN password for the sponsor node, respectively.

I.6 Tasks To Be Performed on the Sponsor Node

Complete the following steps on the sponsor node.

  1. At the command line prompt execute SQL*Plus.

    $ sqlplus /nolog
    SQL> connect /as sysdba
    SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS;
    
    

    This command creates a trace file under the user dump destination directory. In this example, that directory is /private/oracle/app/oracle/admin/LDAP/udump.

    The file will be created in the following format:

    $ORACLE_SID_ora_processid.trc
    
    

    For example:

    ldap_ora_4765.trc
    
    
  2. Shut down the LDAP and replication servers and OID Monitor processes. Make sure the ldap and replication servers are stopped before stopping the OID Monitor process.

    $ oidctl connect=connect_string server=oidrepld instance=instance_number stop
    $ oidctl connect=connect_string server=oidldapd instance=instance_number stop
    $ oidmon connect=connect_string stop
    
    

    You can also stop OIDMON and the LDAP server process using opmn. Ensure that the replication server, directory server and OIDMON are shut down before you proceed to next step.

    In these commands, connect_string is the net service name in the node's tnsnames.ora file.

  3. On the other nodes of the directory replication group (DRG), shut down the LDAP replication server only.

    $ oidctl connect=connect_string server=oidrepld instance=instance_number stop
    
    

    Repeat this procedure on all nodes except the sponsor node. Specify appropriate net service names for the corresponding nodes.

  4. Perform this step only if adding a node to an existing DRG. Quiesce Oracle Database Advanced Replication by running the following commands at the master definition site (MDS):

    cd $ORACLE_HOME/ldap/admin 
    
    

    At the command line prompt execute SQL*Plus.

    $ sqlplus /nolog
    SQL> connect repadmin/repadmin_password;
    SQL> @oidrsusp.sql
    
    

    Note:

    Perform this procedure only on the master definition site.

    At this point, other nodes are available for LDAP edits only, but replication will not take place.

  5. Shut down the database and Oracle Net Services listener on the sponsor node only:

    $ lsnrctl [listener_name] stop  
    $ sqlplus /nolog
    SQL> connect /as sysdba 
    SQL> shutdown normal 
    SQL> exit
    
    

    By default, the listener name is LISTENER.

  6. Copy the trace file created under Step 1 to a new file, newdb.sql, under the same directory.

    $ cd $ORACLE_BASE/admin/LDAP/udump
    $ cp ldap_ora_4765.trc newdb.sql
    
    
  7. Edit newdb.sql, using any text editor, and delete all the lines except the STARTUP NOMOUNT and CREATE CONTROLFILE statements. After editing, newdb.sql should look like this:

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "LDAP" RESETLOGS  NOARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 3
        MAXDATAFILES 100    MAXINSTANCES 8
        MAXLOGHISTORY 454
    LOGFILE
      GROUP 1 '/private/oracle/oradata/LDAP/redo01.log'  SIZE 10M,
      GROUP 2 '/private/oracle/oradata/LDAP/redo02.log'  SIZE 10M,
      GROUP 3 '/private/oracle/oradata/LDAP/redo03.log'  SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
      '/private/oracle/oradata/LDAP/system01.dbf',
      '/private/oracle/oradata/LDAP/sysaux01.dbf',
      '/private/oracle/oradata/LDAP/users01.dbf',
      '/private/oracle/oradata/LDAP/dcm.dbf',
      '/private/oracle/oradata/LDAP/portal.dbf',
      '/private/oracle/oradata/LDAP/ptldoc.dbf',
      '/private/oracle/oradata/LDAP/ptlidx.dbf',
      '/private/oracle/oradata/LDAP/ptllog.dbf',
      '/private/oracle/oradata/LDAP/oca.dbf',
      '/private/oracle/oradata/LDAP/discopltc1.dbf',
      '/private/oracle/oradata/LDAP/discopltm1.dbf',
      '/private/oracle/oradata/LDAP/oss_sys01.dbf',
      '/private/oracle/oradata/LDAP/wcrsys01.dbf',
      '/private/oracle/oradata/LDAP/uddisys01.dbf',
      '/private/oracle/oradata/LDAP/b2b_dt.dbf',
      '/private/oracle/oradata/LDAP/b2b_rt.dbf',
      '/private/oracle/oradata/LDAP/b2b_idx.dbf',
      '/private/oracle/oradata/LDAP/b2b_lob.dbf',
      '/private/oracle/oradata/LDAP/bam.dbf',
      '/private/oracle/oradata/LDAP/orabpel.dbf',
      '/private/oracle/oradata/LDAP/attrs1_oid.dbf',
      '/private/oracle/oradata/LDAP/battrs1_oid.dbf',
      '/private/oracle/oradata/LDAP/gcats1_oid.dbf',
      '/private/oracle/oradata/LDAP/gdefault1_oid.dbf',
      '/private/oracle/oradata/LDAP/svrmg1_oid.dbf',
      '/private/oracle/oradata/LDAP/ias_meta01.dbf',
      '/private/oracle/oradata/LDAP/undotbs.dbf'
    CHARACTER SET AL32UTF8
    ;
    
    
  8. Make following changes to newdb.sql.

    1. Change the line:

      CREATE CONTROLFILE REUSE DATABASE "LDAP" RESETLOGS  NOARCHIVELOG
      
      

      to say:

      CREATE CONTROLFILE REUSE SET DATABASE "NLDAP" RESETLOGS  NOARCHIVELOG
      
      
    2. Modify the UNIX directory location of the database and logfiles to point to the new node site's directory.

    In our example, after these modifications, newdb.sql should look like this:

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE SET DATABASE "NLDAP" RESETLOGS  NOARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 3
        MAXDATAFILES 100
        MAXINSTANCES 8
        MAXLOGHISTORY 454
    LOGFILE
      GROUP 1 '/private1/oracle/oradata/NLDAP/redo01.log'  SIZE 10M,
      GROUP 2 '/private1/oracle/oradata/NLDAP/redo02.log'  SIZE 10M,
      GROUP 3 '/private1/oracle/oradata/NLDAP/redo03.log'  SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
      '/private1/oracle/oradata/NLDAP/system01.dbf',
      '/private1/oracle/oradata/NLDAP/sysaux01.dbf',
      '/private1/oracle/oradata/NLDAP/users01.dbf',
      '/private1/oracle/oradata/NLDAP/dcm.dbf',
      '/private1/oracle/oradata/NLDAP/portal.dbf',
      '/private1/oracle/oradata/NLDAP/ptldoc.dbf',
      '/private1/oracle/oradata/NLDAP/ptlidx.dbf',
      '/private1/oracle/oradata/NLDAP/ptllog.dbf',
      '/private1/oracle/oradata/NLDAP/oca.dbf',
      '/private1/oracle/oradata/NLDAP/discopltc1.dbf',
      '/private1/oracle/oradata/NLDAP/discopltm1.dbf',
      '/private1/oracle/oradata/NLDAP/oss_sys01.dbf',
      '/private1/oracle/oradata/NLDAP/wcrsys01.dbf',
      '/private1/oracle/oradata/NLDAP/uddisys01.dbf',
      '/private1/oracle/oradata/NLDAP/b2b_dt.dbf',
      '/private1/oracle/oradata/NLDAP/b2b_rt.dbf',
      '/private1/oracle/oradata/NLDAP/b2b_idx.dbf',
      '/private1/oracle/oradata/NLDAP/b2b_lob.dbf',
      '/private1/oracle/oradata/NLDAP/bam.dbf',
      '/private1/oracle/oradata/NLDAP/orabpel.dbf',
      '/private1/oracle/oradata/NLDAP/attrs1_oid.dbf',
      '/private1/oracle/oradata/NLDAP/battrs1_oid.dbf',
      '/private1/oracle/oradata/NLDAP/gcats1_oid.dbf',
      '/private1/oracle/oradata/NLDAP/gdefault1_oid.dbf',
      '/private1/oracle/oradata/NLDAP/svrmg1_oid.dbf',
      '/private1/oracle/oradata/NLDAP/ias_meta01.dbf',
      '/private1/oracle/oradata/NLDAP/undotbs.dbf'
    CHARACTER SET AL32UTF8
    ;
    
    
  9. Copy the initialization parameter file init$ORACLE_SID.ora of the sponsor directory's database to init$ORACLE_SID_NEW_DIR_DB.ora. The default location of the initialization parameter file is $ORACLE_HOME/dbs on UNIX and %ORACLE_HOME%\database on Windows. In our example, copy /private/oracle/app/oracle/product/OraHome_1/dbs/initLDAP.ora to /private/oracle/app/oracle/product/OraHome_1/dbs/initNLDAP.ora as shown here:

    $cd $ORACLE_HOME/dbs
    $cp initLDAP.ora initNLDAP.ora
    
    

    If you are using the server parameter file spfile$ORACLE_SID.ora or spfile.ora instead of an initialization parameter file, create an initialization parameter file from the server parameter file as shown in the following example:

    $sqlplus /nolog
    SQL> connect / as sysdba
    SQL> create pfile from spfile
    
    

    The previous example assumes that spfile$ORACLE_SID.ora is located in the default location $ORACLE_HOME/dbs. In our example, the previous step will create an initLDAP.ora file at /private/oracle/app/oracle/product/OraHome_1 from spfileLDAP.ora. If the server parameter file is not located in the default location, you must include the complete path, as shown in the following example:

    $sqlplus /nolog
    SQL> connect / as sysdba
    SQL> create pfile='/private/oracle/initLDAP.ora' from
     spfile=/private/oracle/initLDAP.ora
    
    

    After you create the initialization file parameter file, create a copy of it as explained at the beginning of this step.

  10. In the new initialization parameter file, make following changes:

    1. Comment the parameter JOB_QUEUE_PROCESSES.

    2. Change the parameter dbname from LDAP to NLDAP.

    3. If the new site's domain name is different from the sponsor directory's domain name, alter the parameter db_domain also.

    4. Alter the location of following parameters to point to location of the new site.

      background_dump_dest
      core_dump_dest
      user_dump_dest
      control_files
      db_recovery_file_dest
      
      
    5. In addition to the parameters listed in step d, if your initialization parameter file has any parameters that are node specific, such as DB_RECOVERY_FILE_DEST and DB_CREATE_FILE_DEST, alter those parameters as well.

    In our example, the initialization parameter file initNLDAP.ora will look like this after these modifications:

    *.aq_tm_processes=1
    *.background_dump_dest='/private1/oracle/app/oracle/admin/NLDAP/bdump'
    *.compatible='10.1.0.2.0'
    *.control_files='/private1/oracle/app/oracle/admin/NLDAP/control01.ctl',
                    '/private1/oracle/app/oracle/admin/NLDAP/control02.ctl',
    '/private1/oracle/app/oracle/admin/NLDAP/control03.ctl'
    *.core_dump_dest='/private1/oracle/app/oracle/admin/NLDAP/cdump'
    *.db_block_size=8192*.db_cache_size=50331648
    *.db_domain='acme.com'
    *.db_file_multiblock_read_count=16
    *.db_name='NLDAP'*.db_recovery_file_dest='/private/oracle1/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.dispatchers='(PROTOCOL=TCP)(PRE=oracle.aurora.server.GiopServer)',
                  '(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)'
    *.java_pool_size=67108864#*.job_queue_processes=5
    *.large_pool_size=8388608
    *.max_commit_propagation_delay=0
    *.open_cursors=300
    *.pga_aggregate_target=33554432*.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sessions=400
    *.shared_pool_size=150994944
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS'
    *.user_dump_dest='/private1/oracle/app/oracle/admin/NLDAP/udump'
    
    
  11. Edit the tnsnames.ora file to include information connection details of to the new node. Refer to the following sample file:

    LDAP.ACME.COM =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rst-sun)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ldap.acme.com)
        )
      )
    NLDAP.ACME.COM =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = dsm-sun)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = nldap.acme.com)    )
      )
    
    
  12. Copy the file listener.ora to list.bak. Edit the copied file list.bak to include the information pertaining to the new node. Refer to the following sample file:

    # The KEY value for the IPC protocol may be anything, and
    # is not related to either the TCP hostname or database SID.
     
    LISTENER =
      (ADDRESS_LIST =
            (ADDRESS=(PROTOCOL= IPC)(KEY= LDAP))
            (ADDRESS=(PROTOCOL= IPC)(KEY= PNPKEY))
            (ADDRESS=(PROTOCOL= TCP)(Host= dsm-sun)(Port= 1521))
      )
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME= dsm-sun.us.oracle.com)
          (ORACLE_HOME= /private1/oracle/app/oracle/product/OraHome_1)
          (SID_NAME = NLDAP)
        )
        (SID_DESC =
          (SID_NAME = extproc)
          (ORACLE_HOME = /private1/oracle/app/oracle/product/OraHome_1)
          (PROGRAM = extproc)
        )
      )
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    
    

    The default location oftnsnames.ora and listener.ora is the directory $ORACLE_HOME/network/admin on UNIX and the directory ORACLE_HOME\network\admin on Windows. It can also be in one of these locations:

    • The directory specified by the TNS_ADMIN environment variable or registry value.

    • On UNIX operating systems, the global configuration directory. For example, on Solaris, this directory is /var/opt/oracle.

  13. Copy the updated tnsnames.ora file to the other nodes. You can copy them to other nodes either using FTP or another appropriate method.

    Prior to copying the file tnsnames.ora to the new node, install the Oracle database software on the new node. Also copy the files list.bak, listener.ora, and sqlnet.ora from the sponsor node to the new node.

  14. Create an archive of all the data files and compress the archived file. For example:

>> $ find / -name *.dbf -print \
            -exec tar rvf tar_file_name_with_absolute_path {} \;

This command will search for all files ending with extension.dbf, starting from the root directory. The assumption is that there is only one instance of the database server installed on the node and that data files end with the .dbf extension.

Compress the archive file:

>> $ compress  tar_file_name_with_absolute_path

This procedure is only an example to illustrate the method to back up the files. The Oracle data files will be backed up in the absolute path using this method. It is a better idea to back up the files from the current directory, so that you have more flexibility as to where you can restore the data files. Consult your system administrator before backing up the database.

I.7 Tasks To Be Performed on the New Node

Complete the following steps on the new node.

  1. Stop application server control, DCM, opmn, database and listener services in the new node:

    $> emctl stop iasconsole
    $> $ORACLE_HOME/dcm/bin/dcmctl stop
    $> $ORACLE_HOME/opmn/bin/opmnctl stopall
    $> sqlplus "/ as sysdba"
    SQL> shutdown immediate;
    SQL> exit
    $> lsnrctl [listener_name] stop
    
    
  2. Copy the initialization parameter file initNLDAP.ora from the sponsor node (rst-sun) to the new node under the UNIX directory $ORACLE_HOME/dbs using FTP or another appropriate tool. Ensure that the contents of the copied file initNLDAP.ora are valid after copying.

  3. Ensure that following files do not exist in the directory $ORACLE_HOME/dbs on UNIX or ORACLE_HOME\dbs in Windows:

    • spfileNLDAP.ora

    • spfile.ora

      If either of these files exists, the Oracle database will use that file instead of the initNLDAP.ora file you copied from sponsor node.

  4. Copy the archived file created in step 14 of steps to be performed at the sponsor node procedure, using FTP or another appropriate tool. The following example uses FTP tool to copy the archived file from rst_sun.

    $ ftp
    ftp> open rst-sun
    Connected to rst-sun.us.oracle.com.
    220 rst-sun FTP server (UNIX(r) System V Release 4.0) ready.
    Name (rst-sun:oracle):              
    331 Password required for oracle.
    Password:
    230 User oracle logged in.
    ftp> cd /private1/oracle/oradata/LDAP
    250 CWD command successful.
    ftp> binary
    200 Type set to I.
    ftp> mget oradb.tar.Z
    
    

    If the data files are huge (several gigabytes or terabytes) and the network bandwidth is low, then it may be a better idea to physically ship the compressed file on any media, such as tape or disk, from the sponsor to the new node.

    Extract the archived file on the new node. For example:

    $ uncompress oradb.tar.Z
    $ tar xvf oradb.tar
    
    

    Ensure that the data files are extracted to correct directory. In our example, it is /private1/oracle/oradata/NLDAP

  5. Using FTP or another appropriate tool, copy the file newdb.sql you created in Step 6 of "Tasks To Be Performed on the Sponsor Node" . For example:

    $ cd /private1/oracle/app/oracle/admin/NLDAP/udump 
    $ ftp
    ftp> open rst-sun
    ftp> cd /private1/oracle/app/oracle/admin/LDAP/udump
    ftp> mget newdb.sql
    
    
  6. At the UNIX shell prompt, set ORACLE_BASE, ORACLE_HOME and ORACLE_SID environment variables. For example (using the C shell):

    $ setenv ORACLE_BASE /private1/oracle/app/oracle
    $ setenv ORACLE_HOME /private1/oracle/app/oracle/product/OraHome_1
    $ setenv ORACLE_SID NLDAP
    
    
  7. In the same UNIX shell, execute newdb.sq using SQL*Plus as shown in the following example:

    $ sqlplus /nolog
    SQL> connect /as sysdba
    SQL> @newdb.sql
    SQL> shutdown normal
    SQL>exit
    
    
  8. Edit the initialization parameter file initNLDAP.ora in the $ORACLE_HOME/dbs directory to uncomment the parameter job_queue_processes. Its value must be equal to or greater than the number of nodes in the Directory Replication Group.

  9. Start up the database and listener as follows:

    $ sqlplus /nolog
    SQL> connect /as sysdba
    SQL> startup mount
    SQL> alter database open resetlogs
    SQL> exit
    $ lsnrctl start
    
    
  10. Log in to the sponsor node and start up the database and listener on the sponsor node. In our example, the sponsor node is rst-sun.

    $ telnet rst-sun
    $ sqlplus /nolog
    SQL> connect /as sysdba
    SQL> startup
    SQL> exit
    $ lsnrctl start  # By default listener name is LISTENER
    $ exit
    
    
  11. Change the global database name of the new node.

    SQL> connect /as sysdba
    SQL> alter database rename global_name to NLDAP;
    SQL> exit
    
    
  12. Add a temporary file to the tablespace using the following command:

    SQL> connect /as sysdba
    SQL> ALTER TABLESPACE TEMP ADD TEMPFILE temp01.dbf size 2000k;
    SQL> exit
    
    
  13. Delete the wallet files oidpwdlldap1 and oidpwdr* at new node and reset ODS password

    $ cd $ORACLE_HOME/ldap/admin
    
    $ rm oidpwdlldap1 oidpwdr*
    
    
  14. Reset the password and start Oracle Internet Directory processes.

    $ oidpasswd connect=nldap.acme.com create_wallet=true current_password=ods
    
    
    $ oidmon connect=nldap.acme.com start
    $ oidctl connect=nldap.acme.com server=oidldapd instance=1 start
    
    
  15. Reset the ReplicaID at the new node. After the database copy, the replicaid in the database of the new node will be same as that of the sponsor node. Therefore, the new node's replicaid must be replaced. The new value of replicaid must be of the form hostname_sid where hostname is the host name (without the domain name) of the new node where Oracle Internet Directory server's repository will be running and sid is the ORACLE_SID of the new node database. In our example, the replicaid is dsm-sun_nldap. Ensure that all letters of the replicaid are in lower case. To reset the value of replicaid:

    1. Create a file, chgrid.ldif, with the following contents:

      dn: 
      changetype: modify
      replace: orclreplicaid
      orclreplicaid: dsm-sun_nldap
      
      
    2. Using the ldapmodify tool, change the replicaid:

      $ $ORACLE_HOME/bin/ldapmodify -p port#_of_ldap_server -h hostname \   -f chgrid.ldif
       
      
  16. Rename the replica subentry. The replica subentry's DN is of the format

    orclreplicaid=replicaid,cn=replication configuration
    
    

    Since the replica id of the new node is changed in the previous step, this entry DN must be renamed. To rename it, execute the following command:

    $ $ORACLE_HOME/bin/ldapmoddn -h New_node_hostname -p port \
           -D "cn=orcladmin" -w $1 -r \
           -b "orclreplicaid=sponsor_replicaid,cn=replication configuration" \
           -R "orclreplicaid=new_replicaid" -N "cn=replication configuration"
    
    
  17. In addition to renaming the replica subentry, change the orclreplicauri, orclreplicasecondaryuri and orclreplicastate attributes of the replica subentry. The orclreplicauri and orclreplicasecondaryuri attributes must be modified to contain the URI of the new node's ldap server. The orclreplicastate attribute must be set to 6, which will be used by remtool to identify that this a database copy-based addnode. To change the values, proceed as follows.

    1. Create an LDIF file, modsubentry.ldif, with the following contents:

      dn: orclreplicaid=new_replicaid,
       cn=replication configuration
      changetype: modify
      replace: orclreplicauri
      #Use your host name and port number 
      #where ldap server is listening
      orclreplicauri: ldap://dsum-sun:389/
      -
      replace:orclreplicasecondaryuri
      #Use your fully qualified host name and 
      #the port number where ldap server is listening
      orclreplicasecondaryuri: 
      ldap://dsum-sun.acme.com:389/
      -
      replace:orclreplicastate
      orclreplicastate: 6
      
      
    2. Using the ldapmodify tool, apply the changes to the directory:

      $ ldapmodify -p port#_of_ldap_server -h hostname -f chgrid.ldif
       
      

      Note:

      Set the orclreplicastate attribute of the configuration entry orclreplicaid=replicaid,cn=replication to 6 at the node that will act as the Remote Master Site. The previous example assumes that the new node will be the Remote Master Site and sets the orclreplicastate attribute to 6 there. If you want to use the new node as the Master Definition Site and the sponsor node as the Remote Master Site, set the orclreplicastate attribute to 6 at the sponsor node.

  18. Stop Oracle Internet Directory processes.

    oidmon connect=connect_string stop
    
    
  19. Reset the replication DN password of the new node:

    remtool -presetpwd -bind new_node_host:new_node_port
    
    
  20. Clean up changelog tables at the new node.

    $ sqlplus /nolog
    SQL> connect ods/<ods password>;
    SQL> truncate table ods.ods_chg_log;
    SQL> truncate table ods.ods_chg_stat;
    SQL> truncate table ods.asr_chg_log;
    
    
  21. To configure Oracle Database Advanced Replication, if you are adding new node to an existing DRG, at the shell prompt, execute the following command:

    $ remtool -addnode
    
    

    To configure Oracle Database Advanced Replication, if you are creating a new DRG consisting of sponsor node and new node, at the shell prompt, execute the following command:

    $ remtool -asrsetup
    
    

    See Also:

    The "remtool" command-line tool reference in Oracle Identity Management User Reference

  22. Start up the LDAP replication server on all the nodes, including the new node and sponsor node.


    Note:

    The sponsor node might contain changelogs for operations that occurred before you performed the database copy procedure. If so, after the replication server is started, these changelogs will be propagated to the new node. Propagation will fail, however, because directory data in the new database copy node is already consistent with data in the sponsor node. As a result, these changelogs will end up in the Human Intervention Queue at the database copy node.

    If you have created a new DRG consisting of the sponsor node and the new node, you can avoid these errors by truncating the ods_chg_log table at the sponsor node before starting the LDAP server at the sponsor node.

    If you have added the new node to an existing DRG, do not truncate the table at sponsor node. Instead, let the changes end up in the Human Intervention Queue at the new node. Then the administrator should clean up the queue as described in "Resolving Conflicts Manually in a Multimaster Replication Group" in Chapter 25.


  23. Update the OIDport and OIDsslport parameters in the $ORACLE_HOME/config/ias.properties file with the non-SSL port and SSL port where the directory server of the new node is currently listening:

    [ComponentConfig]
    ...
    [InstallData]
    ...
    OIDhost=dsm-sun
    OIDport=current_non_ssl_port_of_ldap_server
    OIDsslport=current_ssl_port_of_ldap_server
    ...
    FarmAdminSupported=FALSE
    
    

I.8 Verification Process

Log in to the Oracle database by using SQL*Plus and specify the user name as ODS, and the password ods when prompted.

Check the ods_chg_stat table on all nodes and see if they have correct and identical rows. The ods_chg_stat table should contain number_of_nodes X number_of_nodes rows. For example, if there were two nodes participating in Oracle Database Advanced Replication-based replication, and you added a third node, the ods_chg_stat table would contain nine rows, that is, 3 x 3, on each node. The rows are shown in the following table:

Supplier Consumer Change Number
Node1 node2 number 1
Node1 node3 number 2
Node1 node1 number 3
Node2 node1 number 4
Node2 node2 number 5
Node2 node2 number 6
Node3 node1 0
Node3 node2 0
Node3 node3 0

The rows with consumer names identical to that of suppliers contain the last changes processed by the outbound change log processing threads at the supplier sides. The rows with different supplier and consumer names contain last change numbers already processed from the suppliers to the consumers in question.

Since Node3 is a new node, there have been no changes supplied by Node3 yet. Therefore, the change numbers for Node3 as supplier are 0.

There may be a time delay before all nodes contain identical rows, but this delay should not be more than two to three minutes.