Skip Headers

Oracle® Internet Directory Administrator's Guide
10g (9.0.4)

Part Number B12118-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to beginning of chapter Go to next page

Addition of a Directory Node by Using the Database Copy Procedure, 5 of 7


Tasks To Be Performed on the Sponsor Node

Complete the following steps on the sponsor node.

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

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

    This command creates 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:

    $ORACLE_SID_ora_processid.trc
    
    
    

    For example:

    ldap_ora_4765.trc
  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=connect_string server=oidrepld instance=instance_number stop
       $ oidctl connect=connect_string server=oidldapd instance=instance_number stop
       $ oidmon connect=connect_string stop
    
    

    In these commands, connect_string 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=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. Quiesce Oracle9i Advanced Replication by running the following script at the master definition site (MDS):

     ldaprepl.sh -quiesce

    When prompted, enter the Oracle global name and replication administration password for the MDS.


    Note:

    To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:



    Note:

    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 Oracle Net Services listener on the sponsor node only:

     $ lsnrctl [listener_name] stop  (By default listener name is LISTENER)
     $ sqlplus /nolog
     SQL> connect /as sysdba 
     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.

    CREATE CONTROLFILE REUSE SET DATABASE database_name RESETLOG
    
    
  8. Modify the UNIX directory location of the database/logfiles to point to the new node directory. Refer to the sample file newdb.sql as follows:

    Begin newdb.sql         
    CREATE CONTROLFILE REUSE SET DATABASE "LDAP" RESETLOGS
    MAXLOGFILES 16
    MAXLOGMEMBERS 2
    MAXDATAFILES 255
    MAXINSTANCES 1
    MAXLOGHISTORY 100
    LOGFILE
    GROUP 1 '/private2/oracle/oradata/NLDAP1/log1_NLDAP.dbf'  SIZE 1M,
    GROUP 2 '/private2/oracle/oradata/NLDAP1/log2_NLDAP.dbf'  SIZE 1M
    DATAFILE
    '/private2/oracle/oradata/NLDAP1/sys0_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/rbs1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/attrs1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/dncat1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/cncat1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/objcl1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/cats1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/default1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/temp1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/iattrs1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/idncat1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/icncat1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/iobjcl1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/icats1_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/temp2_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/cats2_NLDAP.dbf',
    '/private2/oracle/oradata/NLDAP1/attrs2_NLDAP.dbf'
    ;
     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 configNLDAP.ora)
    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
    
    ldap1.world =
       (description=
          (address=(protocol=tcp)(host=rst-sun)(port=1521))
          (connect_data=(sid=LDAP))
       )
    ldap2.world =
       (description=
          (address=(protocol=tcp)(host=eas-sun10)(port=1521))
          (connect_data=(sid=LDAP))
       )
    ldap3.world =
       (description=
          (address=(protocol=tcp)(host=dsm-sun)(port=1521))
          (connect_data=(sid=NLDAP))
       )
    
    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.
    
    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/8.1.6)
          (SID_NAME = NLDAP)
        )
        (SID_DESC =
          (SID_NAME = extproc)
          (ORACLE_HOME = /private1/oracle/app/oracle/product/8.1.6)
          (PROGRAM = extproc)
        )
      )
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    
    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_
    which_contains_oradb.tar
    $ 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.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1999, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index