Skip Headers
Oracle Internet Directory Administrator's Guide
10g (10.1.4.0.1)

Part Number B15991-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

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 for an Oracle Database Advanced Replication-based replica and for a full LDAP-based replica. The steps for Advanced replication are slightly different from the steps for LDAP replication. When adding the node, be sure to use the procedure described in Addition of an Oracle Advanced Database Replication-Based Directory Node for an Oracle Database Advanced Replication-based replica or the procedure described in Addition of an LDAP Replication-Based Directory Node for a full LDAP-based replica.

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 the 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 30, "Oracle Internet Directory Replication Installation and Configuration" 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 perform 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 Preliminary 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 \
       –replica "new_node_host:new_node_port/new_node_repldn_pwd" \
       -master "sponsor_host:master_port/sponsor_repl_dn_pwd" 
    
    

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


Note:

If Oracle Delegated Administration Services is not configured, you might see an error message similar to this when you run remtool with the -backupmetadata option:
Failed to add "orclApplicationCommonName=ias.acme.com,
cn=IAS Instances, cn=IAS, cn=Products, cn=OracleContext" 
as "uniquemember" to entry "cn=Associated Mid-tiers,
orclapplicationcommonname=DASApp, cn=DAS,cn=products,
cn=OracleContext at replica ldap://myhost:389

Please ignore this error message.


I.6 Addition of an Oracle Advanced Database Replication-Based Directory Node

This section describes the addition of an Advanced Replication-based directory node. It contains the following sections:

I.6.1 Tasks To Be Performed on the Sponsor Advanced Replication 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, but replication will not occur.

  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 SET 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. Edit the file newdb.sql, as follows:

    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 c, 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 {} \;


Note:

All files listed under DATAFILE in newdb.sql must be archived.

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.6.2 Tasks To Be Performed on the New Advanced Replication 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\database 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 5 of "Tasks To Be Performed on the Sponsor LDAP Replication 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
    $ 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 new_node_hostname \   -f chgrid.ldif
       
      
  16. Because the replica id of the new node was changed in step 15, you must re-create the relative replica entries for the new node, as follows:

    $ remtool –pcleanup –bind "new_node_host:new_node_port/new_node_repl_pswd"
    
    

    The remtool command will report an error and prompt for input because there are no replica entries corresponding to the replica id from the previous step yet. It will use your responses to rectify the error. For example,

    remtool -pcleanup -bind "new_node_host:new_node_port/new_node_repl_pswd"
     
     
    Error occurred while getting replication configuration information.
     
    This tool will try to rectify the problem if super user DN and password are provided.
     
    Do you want to continue? [y/n] : y
     
     
    Enter superuser DN                           : cn=orcladmin
     
     
    Enter superuser password                     :
     
    Enter new password of replication DN         :
     
    Reenter new password of replication DN       :
     
    DRG identified by replica ldap://new_node_host:new_node_port (new_replica_id) will be cleaned up.
     
    Do you want to continue? [y/n] : y
     
     
    ------------------------------------------------------------------------------
     
    ------------------------------------------------------------------------------
     
    Replica replica ldap://new_node_host:new_node_port (new_replica_id) has been cleaned up.
    
    
  17. In addition to renaming the replica subentry, change the orclreplicauri and orclreplicasecondaryuri attributes of the replica subentry. The orclreplicauri and orclreplicasecondaryuri attributes must be modified to contain the URI of the new node's ldap server. 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 new_node_hostname -f modsubentry.ldif
       
      

      Note:

      Set the orclreplicastate attribute of the configuration entry orclreplicaid=replicaid,cn=replication configuration 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. If you have performed a database copy from a node that has Advanced replication configured with another node, you must delete the LDAP_REP replication group in the new node. To do so, execute the following command:

    $> sqlplus  rep_admin_db_account_name/password@db_conn_str_of_new_nodeSQL> exec dbms_repcat.drop_master_repgroup( gname => 'LDAP_REP' ) 
    
    
  19. Stop Oracle Internet Directory processes.

    oidmon connect=connect_string stop
    
    
  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 Oracle Internet Directory and 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 Replication Group" in Chapter 30.


  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.6.3 Verification of an Advanced Replication-Based Replica Node

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.

I.7 Addition of an LDAP Replication-Based Directory Node

This section describes the addition of a full LDAP replica directory node. The LDAP replication to this node may be either one-way or two-way. This section contains the following topics:

I.7.1 Tasks To Be Performed on the Sponsor LDAP Replication 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. REMOVE

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

  5. 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
    
    
  6. 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 SET 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
    ;
    
    
  7. 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
    ;
    
    
  8. 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.

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

    1. Change the parameter dbname from LDAP to NLDAP.

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

    3. 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
      
      
    4. In addition to the parameters listed in step c, 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'
    
    
  10. 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 {} \;


Note:

All files listed under DATAFILE in newdb.sql must be archived.

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.2 Tasks To Be Performed on the New LDAP Replication 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\database 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 5 of "Tasks To Be Performed on the Sponsor LDAP Replication 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
    $ 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 new_node_hostname \   -f chgrid.ldif
       
      
  16. Because the replica id of the new node was changed in step 15, you must re-create the relative replica entries for the new node, as follows:

    $ remtool –pcleanup –bind "new_node_host:new_node_port/new_node_repl_pswd"
    
    

    The remtool command will report an error and prompt for input because there are no replica entries corresponding to the replica id from the previous step yet. It will use your responses to rectify the error. For example,

    remtool -pcleanup -bind "new_node_host:new_node_port/new_node_repl_pswd"
     
     
    Error occurred while getting replication configuration information.
     
    This tool will try to rectify the problem if super user DN and password are provided.
     
    Do you want to continue? [y/n] : y
     
     
    Enter superuser DN                           : cn=orcladmin
     
     
    Enter superuser password                     :
     
    Enter new password of replication DN         :
     
    Reenter new password of replication DN       :
     
    DRG identified by replica ldap://new_node_host:new_node_port (new_replica_id) will be cleaned up.
     
    Do you want to continue? [y/n] : y
     
     
    ------------------------------------------------------------------------------
     
    ------------------------------------------------------------------------------
     
    Replica replica ldap://new_node_host:new_node_port (new_replica_id) has been cleaned up.
    
    
  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/
      
      
    2. Using the ldapmodify tool, apply the changes to the directory:

      $ ldapmodify -p port#_of_ldap_server -h new_node_hostname -f modsubentry.ldif
       
      
  18. If you have performed a database copy from a node that has Advanced replication configured with another node, you must delete the LDAP_REP replication group in the new node. To do so, execute the following command

    sqlplus  rep_admin_db_account_name/password
    SQL> exec dbms_repcat.drop_master_repgroup( gname => 'LDAP_REP' )
    
    
  19. Stop Oracle Internet Directory processes.

    oidmon connect=connect_string stop
    
    
  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. Configure LDAP Replication and add the full replica as fan-out, as follows:

    1. Make sure that the database and Oracle Internet Directory server is running at the sponsor node. On the sponsor node, type:

      $ sqlplus /nolog
      SQL> connect /as sysdba
      SQL> startup
      SQL> exit
      $ lsnrctl start
      
      $ oidmon connect=sponor_connect_string start
      $ oidctl server=oidldapd inst=1 connect=sponsor_connect_string flags="-p sponsor_node_port " start 
      
      
    2. Make sure that Oracle Internet Directory server is running at sponsor node. On the new node, type:

      $ oidmon connect=new_connect_string start
      $ oidctl server=oidldapd inst=1 connect=new_connect_string flags="p new_node_port " start 
      
      
    3. Configure LDAP-based replication using remtool, as follows:

      remtool -paddnode
      
      

    See Also:

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

  22. Initialize replication change status of the new replication agreement.

    1. Get the maximum used change number from the sponsor node:

      $ ldapsearch –h sponsor_node_host  -p sponor_node_port -b " " \
         –s base "objectclass=*" lastchangenumber
      
      
    2. Create an LDIF file chgstatus.ldif, with the following contents:

      dn: orclagreementid=new_agreement_id, orclreplicaid=new_replica_id,cn=replication configuration
      changetype:modify
      replace: orcllastappliedchangenumber
      orcllastappliedchangenumber: Number_from_step_a
       
      
    3. Using ldapmodify, apply the change to both the sponsor node and the new node:

    ldapmodify –p sponsor_node_port -h sponsor_node_host -v –f chgstatus.ldif 
    ldapmodify –p new_node_port -h new_node_host -v –f chgstatus.ldif
    
    
  23. Start up Oracle Internet Directory and the LDAP replication server on all the nodes. For one-way replication, you only need to start replication on the consumer 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 Replication Group" in Chapter 30.


  24. 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.7.3 Verification of an LDAP-Based Replica Node

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

  1. Log in to Oracle Directory Manager as orcladmin.

  2. In the navigator pane, expand in succession Oracle Internet Directory Servers, directory server instance, Entry Management.

  3. Create a single entry on the sponsor node.

    The identical entry appears in approximately 1 to 10 minutes on the consumer node. You can adjust the timing in the replication server configuration set entry.