Oracle Internet Directory Administrator's Guide
Release 2.1.1

Part Number A86101-01





Go to previous page Go to next page

Adding a DSA Using the Database Copy Procedure

This appendix describes the procedure to add a new DSA to an existing replicating system by using the database copy procedure, also known as cold backup.


Because this procedure involves copying Oracle data files, faster performance depends on the underlying network. If the underlying network is weak, then it may be better to implement the method described in Chapter 10, "Managing Directory Replication", or to physically ship compressed Oracle data files on a medium such as a tape or disk. Consult your local system or network administrator for more details on the network.

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

This appendix contains these topics:


This document assumes that the UNIX directories are created according to Optimal Flexible Architecture (OFA), the set of configuration guidelines for efficient and reliable Oracle databases.

See Also:

The Oracle installation guide for your operating system for more information on OFA 

Sponsor Directory Site Environment

Set up the environment of the sponsor site. In the example shown throughout this chapter, the host name is rst-sun.

Hostname    = rst-sun
ORACLE_BASE = /private/oracle/app/oracle
ORACLE_HOME = /private/oracle/app/oracle/product/8.1.6
datafile location = /private/oracle/oradata/LDAP
Dump destination =  /private1/oracle/app/oracle/admin/LDAP/pfile,

New Directory Site Environment

Set up the environment for the new directory site. In the example shown throughout this chapter, the new site is on the node named dsm-sun.

      Hostname = dsm-sun
      ORACLE_BASE = /private1/oracle/app/oracle
      ORACLE_HOME = /private1/oracle/app/oracle/product/8.1.6
         datafile location = /private1/oracle/oradata/NLDAP
         Dump destination =  /private1/oracle/app/oracle/admin/NLDAP/pfile,


After installation of the Oracle database or Oracle directory, you use Oracle Database Configuration Assistant to create data file directories. Create the new directories on the new node under various UNIX partitions as defined by OFA. 

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 
    SQL> connect internal

    The above command will create a trace file under the user dump destination directory (that is, /private1/oracle/app/oracle/admin/LDAP/udump).

    The file will be created in the following format:


    For example:

  2. Shutdown 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=<net_service_name> server=oidrepld instance=<inst_#> stop
       $ oidctl connect=<net_service_name> server=oidldapd instance=<inst_#> stop
       $ oidmon connect=<net_service_name> stop

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

  3. On the remaining nodes, shutdown the LDAP replication server only.

    $ oidctl connect=<net_service_name> server=oidrepld instance=<inst_#> stop

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

  4. Quiesce Advanced Symmetric Replication (ASR) by running the following script at the master definition site (MDS): -quiesce

    Enter the Oracle global name for the MDS when prompted.


    This procedure can take place only on the Master Definition Site. 

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

  5. After quiescing the environment, shutdown the database and Net8 listener on the sponsor node only:

     $ lsnrctl [listener name] stop  (By default listener name is LISTENER)
     $ sqlplus 
     SQL> connect internal 
     SQL> shutdown normal 
     SQL> exit
  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 the lines up to START NOMOUNT.

  8. Modify the UNIX directory location of the database/logfiles etc. to point to the new node directory. Refer to the sample file newdb.sql as follows:

    Begin newdb.sql         
    GROUP 1 '/private2/oracle/oradata/NLDAP1/log1_NLDAP.dbf'  SIZE 1M,
    GROUP 2 '/private2/oracle/oradata/NLDAP1/log2_NLDAP.dbf'  SIZE 1M
     End newdb.sql     
  9. Copy the files initLDAP.ora and configLDAP.ora under $ORACLE_HOME/dbs to initNLDAP.ora and configNLDAP.ora respectively.

    $cd $ORACLE_HOME/dbs
    $cp initLDAP.ora initNLDAP.ora
    $cp configLDAP.ora configNLDAP.ora
  10. Edit the copied file (initNLDAP.ora) and comment out the parameter JOB_QUEUE_PROCESS. Change the following parameter:

    db_name = LDAP  (If the parameter does not exist in the file initNLDAP.ora, then modify the file 
    ifile = UNIX_directory_location_of_the_new_config_file/ configNLDAP.ora
  11. Edit the copied file configNLDAP.ora to change the following parameters:

    cdump =  UNIX_directory_location_of_the_new_node
    udump  = UNIX_directory_location_of_the_new_node
    bdump  = UNIX_directory_location_of_the_new_node
    control_files = UNIX_directory_location_of_the_new_node
  12. Edit the tnsnames.ora file to include information pertaining to the new node. Refer to the following sample file:

    Begin tnsnames.ora =
       ) =
       ) =
    End tnsnames.ora
  13. 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:

    Begin listener.ora
    # The KEY value for the IPC protocol may be anything, and
    # is not related to either the TCP hostname or database SID.
            (ADDRESS= (PROTOCOL= TCP)(Host= dsm-sun)(Port= 1521))
      (SID_LIST =
        (SID_DESC =
          (ORACLE_HOME= /private1/oracle/app/oracle/product/8.1.6)
          (SID_NAME = NLDAP)
        (SID_DESC =
          (SID_NAME = extproc)
          (ORACLE_HOME = /private1/oracle/app/oracle/product/8.1.6)
          (PROGRAM = extproc)
    End listener.ora

    The files tnsnames.ora and listener.ora can reside under $ORACLE_HOME/network/admin or /var/opt/oracle or under the directory pointed to by the TNS_ADMIN environment variable.

  14. Copy the updated tnsnames.ora file to all the nodes. Be careful to copy it to the location of the current tnsnames.ora on each node. The file tnsnames.ora can be copied to other nodes using FTP. Make sure you transfer the file in ASCII mode.

    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 as listener.ora and sqlnet.ora from the sponsor node to the new node.

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

    $ >oradb.tar

    This command will create an empty file under a directory. Make sure you have enough space in the partition where the archives will be created.

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

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

    $ find / -name *.log -print -exec tar rvf <absolute_path_of_the_directory_
    $ compress oradb.tar

    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 when you want to restore the data files. Consult your system administrator before backing up the database.

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. Edit the oratab file appropriately for the new instance, at all database nodes. See the sample file for syntax.

    Begin oratab
    End oratab 
  3. Make sure the environment variables are set in the new directory site.

  4. Install the Oracle database and Oracle directory server. Perform software only install of the Oracle database and directory server. Installation of Oracle database and directory software can be performed on the new node at any time before the database files are copied to the new machine. Perform post-installation (that is: activities for the database as well as the Directory server.

    See Also:

    Oracle8i installation 

    If you have already performed Oracle database and Directory installation on the new node, then proceed to Step 5.

  5. Copy the files initNLDAP.ora and configNLDAP.ora from the sponsor node (rst-sun) to the new node under the UNIX directory
    $ORACLE_BASE/ADMIN/NLDAP/PFILE. Files can be copied to the new machine using tools such as FTP. Make sure the transfer mode is ASCII.

  6. Create a symbolic soft link from $ORACLE_HOME/DBS TO $ORACLE_BASE/ADMIN/NLDAP/PFILE.

     $ ln -s $ORACLE_BASE/admin/NLDAP/pfile/initNLDAP.ora 
     $ ln -s $ORACLE_BASE/admin/NLDAP/pfile/configNLDAP.ora 
  7. Copy the archived file created in the sponsor node procedure, using a tool such as FTP. (You created this file in Step 15.) Set the transfer mode to binary.

    ftp> open rst-sun
    Connected to
    220 rst-sun FTP server (UNIX(r) System V Release 4.0) ready.
    Name (rst-sun:oracle):              
    331 Password required for oracle.
    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.

  8. Copy the file newdb.sql created under Step 6 of the sponsor node setup to the background user dump destination directory. You must transfer the file newdb.sql only in ASCII mode. For example:

     $ cd /private1/oracle/app/oracle/admin/NLDAP/udump 
                    (that is::$ORACLE_BASE/admin/<SID>/udump)
    $ ftp
    ftp> open rst-sun
    ftp> cd /private1/oracle/app/oracle/admin/LDAP/udump
    ftp> mget newdb.sql
  9. At the UNIX shell prompt execute the following commands:

    $ sqlplus
    SQL> connect internal
    SQL> startup nomount
    SQL> @newdb.sql
    SQL> shutdown normal
    SQL> startup (uncomment the parameter job_queue_process prior to  startup)
    $ lsnrctl start
  10. Log in to the sponsor node and start up the database and listener on the sponsor node; for example, rst-sun.

    $ telnet rst-sun
    $ sqlplus
    SQL> connect internal
    SQL> startup
    SQL> exit
    $ lsnrctl start (By default listener name is LISTENER)
    $ exit
  11. If the sponsor node is a master site, then proceed to Step 12.

    If the new node is created by using backup database copy of the MDS, then the master definition catalog needs to be dropped and the underlying ASR catalogs must be created. To drop the definition of the MDS from the ASR catalog on the new node and add the ASR catalogs, execute the following scripts.

    $ cd $ORACLE_HOME/ldap/admin
    $ sqlplus repadmin/repadmin
    SQL> @ldapdropmds.sql
    SQL> @ldapcreindex.sql

    Specify the global name of the new node when prompted.

  12. To configure the ASR, at the shell prompt, execute the following command:

    $ -addnode
  13. Update the LDAP replication agreements to include the new node.

    Sample LDIF file:

    dn: orclagreementid=000001, cn=orclreplagreements
    changetype: modify
    add: orcldirreplgroupdsas
    orcldirreplgroupdsas: dsm-sun
  14. Start up the LDAP replication server on all the nodes, including new and sponsor nodes.

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



<number 1> 



<number 2> 



<number 3> 



<number 4> 



<number 5> 



<number 6> 







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.

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

All Rights Reserved.