Previous  |  Next  >  
Product: Storage Foundation Guides   
Manual: Storage Foundation 4.1 FlashSnap Point-In-Time Copy Solutions Administrator's Guide   

Appendix: Preparing a Replica Oracle Database

This appendix describes how to set up a replica off-host Oracle database to be used for decision support as described in Creating an Off-Host Replica Database.

To prepare a replica Oracle database on a host other than the primary host:

  1. If not already present, install the Oracle software onto the host's local disks. The location of the Oracle home directory ($ORACLE_HOME) is used for the database instance that is created from the snapshot volumes.
    Note   Note    In the examples shown here, the home directory is /rep/oracle in the local disk group, localdg. If required, you could instead choose to use the same file paths and database name as on the primary host.
  2. In the local disk group, localdg, use the following command to create the volumes that are to be used for the redo logs and archived logs of the replicated database:
    vxassist -g diskgroup make volume size

    For example, to create a 1-gigabyte redo log volume rep_dbase_logs and a 2-gigabyte archived log volume rep_dbase_arch:


    vxassist -g localdg make rep_dbase_logs 1g
    vxassist -g localdg make rep_dbase_arch 2g
  3. Make the file systems for the redo logs and archive logs in the volumes created in the previous step using the following command:
    mkfs -F vxfs /dev/vx/rdsk/diskgroup/volume

    In this example, the commands would be:


    mkfs -F vxfs /dev/vx/rdsk/localdg/rep_dbase_logs
    mkfs -F vxfs /dev/vx/rdsk/localdg/rep_dbase_arch
  4. Create the mount points that are to be used to mount the new database. For example, create /rep/dbase_vol for the snapshot of the tablespace volume, /rep/dbase_logs for the redo logs, and /rep/dbase_arch for the archived logs:
    mkdir -p /rep/dbase_vol
    mkdir -p /rep/dbase_logs
    mkdir -p /rep/dbase_arch
  5. Mount the redo log and archive log volumes on their respective mount points using the following command:
    mount -F vxfs /dev/vx/dsk/diskgroup/volume mount_point

    In this example, the commands would be:


    mount -F vxfs /dev/vx/dsk/localdg/rep_dbase_logs \ 
      /rep/dbase_logs
    mount -F vxfs /dev/vx/dsk/localdg/rep_dbase_arch \
      /rep/dbase_arch
  6. As the Oracle database administrator on the primary host, obtain an ASCII version of the current Oracle control file using the following SQL command:
    alter database backup controlfile to trace;

    This command writes a text version of the control file to the directory $ORACLE_HOME/admin/dbase/udump. See Text Control File for Original Production Database for an example.

  7. Modify the text version of the control file created in the previous step as described below to create a new SQL script to set up the replica database:
    1. If required, change the locations defined under LOGFILE for the log files. For example, change lines of the form:

    2.    GROUP N '/dbase_vol/logN'  SIZE 52428288,

        so that they read:


         GROUP N '/rep/dbase_vol/logN'  SIZE 52428288,
    3. If required, change the locations defined under DATAFILE for the tablespaces. For example, change lines of the form:

    4.    '/dbase_vol/table',

        so that they read:


         '/rep/dbase_vol/table',
    5. If required, change the following line:

    6.    CREATE CONTROLFILE REUSE DATABASE "odb" NORESETLOGS ARCHIVELOG

        so that it reads:


         CREATE CONTROLFILE SET DATABASE "ndb" RESETLOGS NOARCHIVELOG

        where odb is the name of the original database and ndb is the name of the replica database (DBASE and REP1 in the example). Note that to reduce unnecessary overhead, the new database is not run in archive log mode.

        See SQL Script to Create Control File for an example.

  8. Copy the Oracle initialization file (for example, initdbase.ora; see Initialization File for Original Production Database) for the original database to a new initialization file for the replica database (for example, initREP1.ora; see Initialization File for Replica Oracle Database).
    Edit the copied file and change the definitions of the following parameters:
    background_dump_dest Background dump location.
    core_dump_dest Core dump location.
    db_name Database name to the name of the replica database.
    log_archive_dest Archive log location, set equal to the path created in step 4 (for example, /rep/dbase_arch).
    log_archive_start Archive log mode, log_archive_start, to FALSE.
    user_dump_dest User dump location.
    You may also wish to reduce the resource usage of the new database by adjusting the values of parameters such as db_block_buffers. See the Oracle Database Administrator's Guide for more information.
  9. Copy the Oracle remote password file (for example, orapwdbase) in $ORACLE_HOME/dbs to a new file (for example, orapwREP1).

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation Guides  
Manual: Storage Foundation 4.1 FlashSnap Point-In-Time Copy Solutions Administrator's Guide  
VERITAS Software Corporation
www.veritas.com