A.11 Adding a Directory Node by Using the Database Copy Procedure

You need to add a new node to an existing replicating system for Oracle Internet Directory by using the database copy procedure, also known as cold backup.

Note:

This procedure works only for Oracle Internet Directory. Do not use this procedure if other Oracle Identity Management components such as Oracle Single Sign-On are installed. You can use the database copy procedure to create a new directory replication group (DRG) if you have a standalone Oracle Internet Directory node. This procedure is applicable for a full LDAP-based replica.

The following sections explain it further:

A.11.1 Definition of Sponsor Site and New Site in Database Copy Procedure

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.

A.11.2 Prerequisites for Database Copy Procedure

Your computing environment must meet certain prerequisites before database copy procedure,

Prerequisites before you start this procedure:

  • 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 levels of the operating systems differ.

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

  • Because this procedure involves copying Oracle data files, performance depends on the underlying network. If the underlying network is slow, consider using one of the methods described in Setting Up Replication 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.

  • Only a person familiar with the Oracle database should perform this procedure.

A.11.3 Sponsor Directory Site Environment for Database Copy Procedure

The sponsor directory site environment for database copy procedure is explained with an example.

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

Hostname = rst-sun
Domain name = example.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

A.11.4 New Directory Site Environment for Database Copy Procedure

New directory site's environment for database copy procedure is explained with an example.

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

Hostname = dsm-sun
Domain name = example.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.AL32UTF8
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
 

Everything except the hostname and domain name is created during installation of the Oracle Database.

A.11.5 Adding a Directory Node by using Database Copy Procedure

You can add a directory node by using the database copy procedure.

This section contains the following topics:

A.11.5.1 Setting Up Sponsor Node

Perform the following activities to set up the sponsor node:

A.11.5.1.1 Installing Identity Management with Oracle Internet Directory on Sponsor Node

Install Identity Management with the Oracle Internet Directory component on the sponsor node. See Installing and Configuring Oracle Identity Management in Installing and Configuring Oracle Internet Directory.

See Also:

About the Directories for Installation and Configuration in Planning an Installation of Oracle Fusion Middleware.

A.11.5.1.2 Checking the Status of Oracle Internet Directory

To check the status of Oracle Internet Directory, type:

oid_instanceStatus(instanceName = 'instance-name')

The status should be Alive.

A.11.5.1.3 Shutting Down All opmn Processes

Shut down Oracle Internet Directory and all other opmn processes on the sponsor node, as follows:

$ cd ORACLE_INSTANCE/bin 
$ opmnctl stopall
 
A.11.5.1.4 Shutting Down Database and Oracle Net Services Listener on Sponsor Node

Shut down the database and Oracle Net Services listener on the sponsor node. By default, the listener name is LISTENER. Type:

$ lsnrctl stop 
$ sqlplus /nolog 
SQL> connect / as sysdba  
SQL> shutdown  
SQL> exit 
A.11.5.1.5 Renaming Trace File to newdb.sql

Rename the trace file created earlier to newdb.sql, under the same directory.

$ cp ORACLE_SID_ora_processid.trc newdb.sql
A.11.5.1.6 Editing newdb.sql File on the Sponsor Node

Edit the newdb.sql file on the server node as mentioned below:

  1. On the sponsor node, open newdb.sql in a text editor and delete all the lines except the STARTUP NOMOUNT and CREATE CONTROLFILE statements. After deleting those lines, 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
    ;
    
  2. Continue editing the file newdb.sql on the sponsor node, as follows:

    1. Change the line:

      CREATE CONTROLFILE REUSE DATABASE "LDAP" RESETLOGS  NOARCHIVELOG
      

      to:

      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
    ;
    
A.11.5.1.7 Creating and Copying Initialization Parameter File

Copy the initialization parameter file init$ORACLE_SID.ora from 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 or Linux 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. For example, if spfile$ORACLE_SID.ora is located in the default location $ORACLE_HOME/dbs you would type:

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

This sequence of commands creates 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:

SQL> connect / as sysdba
SQL> create pfile='/private/oracle/initLDAP.ora' from
 spfile=/private/oracle/initLDAP.ora
SQL> shutdown immediate

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

A.11.5.1.8 Editing the Initialization Parameter File on the Sponsor Node

In the new initialization parameter file on the sponsor, make the following changes:

  1. Comment out the parameter JOB_QUEUE_PROCESSES, if it exists.
  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 the following parameters to point to the location of the new site.
    background_dump_dest
    core_dump_dest
    user_dump_dest
    control_files
    db_recovery_file_dest
    
  5. In addition to these parameters, 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 looks 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='example.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'
A.11.5.1.9 Including Connection Details for the New Node in tnsnames.ora File

Edit the tnsnames.ora file to include connection details for 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)    )
  )
A.11.5.1.10 Creating a Compressed Archive File of All Data Files

Create an archive of all the data files and compress the archived file. Be sure to include all the files listed under DATAFILE in newdb.sql.

As an example, you could use the following commands to go to the database file location and generate a compressed archive called OID_DB.tar.Z:

$ cd $ORACLE_BASE/oradata/$ORACLE_SID  
$ tar -cvf OID_db.tar *.dbf   
$ compress OID_db.tar   

A.11.5.2 Setting Up New Node

Perform the following activities to set up the new node:

A.11.5.2.1 Installing Oracle Database on New Node

Install Oracle Database on the new node using the software only option. See the Oracle Database Installation Guide for your platform and Installing and Configuring Oracle Internet Directory.

A.11.5.2.2 Creating Data File, Dump, and Trace File Directories in New Node

When the software-only install on the new node has completed, the following directory exists:

/private1/oracle/app/oracle/product/OraHome_1/diag/rdbms

Create the following directories on the new node:

  • Datafile location: /private1/oracle/app/oracle/oradata/NLDAP

  • Dump destinations:

    /private1/oracle/app/oracle/admin/NLDAP/adump

    /private1/oracle/app/oracle/admin/NLDAP/udump

    /private1/oracle/app/oracle/flash_recovery_area

  • Trace file location: /private1/oracle/app/oracle/product/OraHome_1/diag/rdbms/nldap/nldap/trace

A.11.5.2.3 Copying Archived File from Sponsor Node to New Node

Copy the archived file created on the sponsor node to the new node, using FTP or another appropriate tool. Change directory to the database file location on the new node, then use FTP to copy the archived file from rst-sun.

$ cd /private1/oracle/app/oracle/oradata/NLDAP
$ ftp
ftp> open rst-sun
Connected to rst-sun.us.example.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 /private/oracle/oradata/LDAP
250 CWD command successful.
ftp> binary
200 Type set to I.
ftp> mget oradb.tar.Z

If the data files are very large (several gigabytes or terabytes) and the network bandwidth is low, consider using media, such as tape or disk, to move the compressed file 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 the correct directory. In our example, it is /private1/oracle/oradata/NLDAP

A.11.5.2.4 Copying Initialization Parameter File from Sponsor Node to New Node

Copy the initialization parameter file initLDAP.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 initLDAP.ora are valid after copying.

In addition, also copy the database password file orclpwORACLE_SID from the sponsor node to the new node.

A.11.5.2.5 Ensuring Non-existence of spfileNLDAP.ora and spfile.ora Files

On the new node, ensure that the 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 uses that file instead of the initNLDAP.ora file you copied from the sponsor node.

A.11.5.2.6 Copying newdb.sql File From Sponsor Node To New Node

Using FTP or another appropriate tool, copy the file newdb.sql you created on the sponsor node in Step 2 to the new 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
A.11.5.2.7 Setting Environment Variables on New Node

At the UNIX shell prompt on the new node, 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
A.11.5.2.8 Running newdb.sql on the New Node by Using SQL*Plus

In the same UNIX shell, execute newdb.sql using SQL*Plus as shown in the following example:

$ sqlplus /nolog
SQL> connect / as sysdba
SQL> @newdb.sql
SQL> shutdown normal
SQL>exit
A.11.5.2.9 Starting the Database and Listener on the New Node

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 
A.11.5.2.10 Changing the Global Database Name on the New Node

Change the global database name of the new node.

SQL> connect / as sysdba 
SQL> alter database rename global_name to NLDAP;  
SQL> exit

Note that the new node ORACLE_SID IS NLDAP.

A.11.5.2.11 Adding Temporary File to the Tablespace on the New Node

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

The value 2000K is just an example. Determine your own value based on the requirements of your environment.

A.11.5.2.12 Configuring Oracle Internet Directory on the New Node

Configure Oracle Internet Directory on the new node:

  1. Install WebLogic Server. See Planning the Oracle WebLogic Server Installation.
  2. Install Oracle Internet Directory. See Installing and Configuring Oracle Internet DirectoryInstalling and Configuring Oracle Internet Directory.

    Note:

    When you configure Oracle Internet Directory on the new node, you must specify the information for the new node database.

A.11.5.2.13 Stopping Oracle Internet Directory

Stop Oracle Internet Directory by using wlst command, as given below:

shutdown(name='instance-name',type='OID')
A.11.5.2.14 Deleting Wallet Files and Resetting ODS Password at the New Node

On the new node, delete the wallet files oidpwdlldap1 and oidpwdr* and reset the ODS password.

$ cd DOMAIN_HOME/config/fmwconfig/components/OID/admin 
$ rm oidpwdlldap1 oidpwdr*
A.11.5.2.15 Resetting Oracle Internet Directory Password on the New Node

On the new node, reset the password and start the Oracle Internet Directory processes.

oidpasswd connect=oiddb create_wallet=true 

you are prompted to provide the current database password, enter a new database password, and confirm the new password.

A.11.5.2.16 Starting Oracle Internet Directory Processes on the New Node

Start Oracle Internet Directory on the new node by using the wlst command, as given below:

start(name='instance-name',type='OID')
A.11.5.2.17 Resetting Replica ID of the New Node

At this point, Oracle Internet Directory on the new node is up and running. The replicaid value in new Oracle Internet Directory node, however, still has the replica id of the sponsor's node. Therefore, you must reset new node's replicaid. The new value of replicaid must be of the form hostname_sid where:

  • hostname is the host name of the new node, without the domain name

  • sid is the ORACLE_SID of the new node database

Ensure that all letters of the replicaid are in lower case.

  1. Create a file, chgrid.ldif, with the following contents:
    dn:
    changetype: modify
    replace: orclreplicaid
    orclreplicaid: new_replicaid
    
  2. Using the ldapmodify tool, change the replicaid:
    $ORACLE_HOME/bin/ldapmodify -h new_node_host -p port_ldap_server -D cn=orcladmin -q -f chgrid.ldif
    
A.11.5.2.18 Recreating Relative Replica Entries for New Node

Because the replica id of the new node was changed, 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 does report an error and prompt for input because there are no replica entries that correspond with the new replica id yet. The remtool command uses your responses to rectify the error. Here is an example, with user input shown in boldface:

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_replicaid) will be cleaned up.    
Do you want to continue? [y/n] : y  
------------------------------------------------------------------------------  
------------------------------------------------------------------------------  
Replica replica ldap://new_node_host:new_node_port (new_replicaid) has been cleaned up.
A.11.5.2.19 Changing Attributes of Replica Subentry

In addition to renaming the replica subentry, you must change the orclreplicauri, orclreplicasecondaryuri and orclreplicastate attributes of the replica subentry. You must modify the orclreplicauri and orclreplicasecondaryuri attributes to contain the URI of the new node's LDAP server. You must set the orclreplicastate attribute must be set to 6, which specifies to remtool 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://new_node_host:new_node_port/  ---  
    replace:orclreplicasecondaryuri  
    # Use your fully qualified host name and  
    # the port number where ldap server is listening  orclreplicasecondaryuri:  
    ldap://new_node_host_with_domain_name:new_node_port/  ----  
    replace:orclreplicastate  
    orclreplicastate: 6  
     
  2. Using the ldapmodify tool, apply the changes to the directory:
    $ ldapmodify -h new_node_host -p port_of_ldap_server -f modsubentry.ldif
    
A.11.5.2.20 Stopping Oracle Internet Directory Processes

To stop Oracle Internet Directory processes, execute the following command:

$shutdown(name='instance-name',type='OID')
A.11.5.2.21 Cleaning Up Change Log Tables at New Node

Clean up the 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;

A.11.5.3 Running LDAP-Based Replication

If the new node is a full LDAP-based replication replica, configure LDAP-based 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 
    Start OID 
    $DOMAIN_HOME/bin/startComponent.sh <instance-name> 
      

    Check the status of Oracle Internet Directory by typing:

    $oid_instanceStatus(instanceName = 'instance-name')  
    
  2. Configure LDAP-based replication using remtool, as follows:
     remtool -paddnode 
    
  3. Initialize the replication change status of the new replication agreement.
    • Get the maximum used change number from the sponsor node:

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

      dn: orclagreementid=new_agreement_id,orclreplicaid=new_replicaid,cn=replication configuration
      changetype: modify 
      replace: orcllastappliedchangenumber;transport$sponsor_replicaid$new_replicaid
      orcllastappliedchangenumber;transport$sponsor_replicaid$new_replicaid: Number_from_ldapsearch
      -
      replace: orcllastappliedchangenumber;apply$sponsor_replicaid$new_replicaid
      orcllastappliedchangenumber;apply$sponsor_replicaid$new_replicaid: Number_from_ldapsearch
       

      where Number_from_ldapsearch refers to the maximum change number from the sponsor node that you obtained using the ldapsearch command.

    • 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 
      
  4. Start up Oracle Internet Directory and the replication server on all the nodes. For one-way replication, you only need to start the replication server on the consumer node.