Creating Oracle database clones for reporting on secondary site replicated using VVR

Article:HOWTO74601  |  Created: 2012-03-14  |  Updated: 2012-03-15  |  Article URL http://www.symantec.com/docs/HOWTO74601
Article Type
How To

Product(s)

Environment

Subject


Creating Oracle database clones for reporting on secondary site replicated using VVR

Customer scenario

If you have an enterprise application setup in which you are replicating your backend Oracle database to a secondary disaster-recovery site using Veritas Volume Replicator (VVR), you can use Storage Foundation for Databases (SFDB) tools to create database clones on the secondary site. You can use the database clones for activities such as report generation without affecting the performance of the primary database.

Figure: Oracle Database DR Setup outlines the VVR replication setup.

Solution

Symantec recommends the following solution for this scenario.

  1. As root, use Storage Foundation commands to perform the following one-time operation on the secondary site.

    • Create a cache object in the disk group in which the Replicated Volume Group (RVG) is configured.

      Note:

      The size of the cache object should be proportional to the amount of data that is getting replicated.

  2. As a DBA, use SFDB tools to perform the following operations.

    • Gather all configuration information from the primary site.

    • Copy the gathered configuration information from the primary site to the secondary site.

  3. As a DBA, use SFDB tools to perform the following operations on the secondary site.

    • Create a space-optimized snapshot of the database and then use it to clone the database.

      Note:

      The size of the cache object must be adequate to accommodate the changes getting replicated after the space-optimized snapshot is created.

      Note:

      The clone of a space-optimized snapshot in a VVR environment is supported for Oracle single instance database only. It is not supported for Oracle RAC database.

    • Repeat the previous operation to create more database clones.

Detailed steps

Create database clones on the VVR secondary site.

See “To create database clones on the secondary site in a VVR setup”.

The outline of the Oracle database VVR replication setup is as follows.

Figure: Oracle Database DR Setup

Oracle Database DR Setup

To create database clones on the secondary site in a VVR setup

  1. Create a cache object in the disk group on which RVG is configured on the secondary site.

    # vxassist -g secdg make datacache 40G sdak
    # vxedit -g secdg set user=ora10gr2 group=dba datacache
    # vxmake -g secdg cache datach cachevolname=datacache autogrow=on
    # vxcache -g secdg start datach
    				
  2. On the primary site, gather configuration information in a file.

    $ vxsfadm -s sos -a oracle -name so_vvr \
    --oracle_sid sfaedb --oracle_home /oracle/10gr2 \
    -o getvvrinfo -role primary
    SOS_NAME             = so_vvr
    ORACLE_SID           = sfaedb
    REPLICATION_ROLE     = secondary
    REPLICATION_DG_VOL   = secdg:datavol
    APP_MODE             = instant
    SNAPSHOT_TIME        = Fri Oct 14 02:50:24 2011
    
    Configuration file /tmp/config.pDr6k is ready.
    Use this configuration file on replication
    secondary site for cloning application instance.
    
  3. Copy the configuration information file from the primary site to the secondary site.

  4. On the secondary site, create a space-optimized snapshot of the database.

    $ vxsfadm -s sos -a oracle --oracle_sid sfaedb \
    --oracle_home /oracle/10gr2 -c config.pDr6k -o snapshot
    Validating database configuration for space-optimized snapshot:
        ORACLE_SID                  = sfaedb
        ORACLE_HOME                 = /oracle/10gr2
        APP_MODE                    = instant
    Database validation successful.
    Validating database volume layout for space-optimized snapshot:
        REPLICATION_DG_VOL          = secdg:datavol
        CACHE_OBJECT                = datach
        Replicated data volumes ready for snapshot:
            Volume/volume-set datavol of diskgroup secdg.
        SNAPSHOT_VOL_PREFIX         = SNAP_
    Database volume layout validated successfully.
    Creating snapshot volumes for data volumes ...            Done
    
  5. On the secondary site, use the space-optimized snapshot to clone the database.

    $ vxsfadm -s sos -a oracle --oracle_sid sfaedb \
    --oracle_home /oracle/10gr2 -c config.pDr6k -o clone \
    --clone_name sovvr --clone_path /tmp/so_vvr
    Mounting snapshot volumes ...                             Done
    Preparing parameter file for clone database ...           Done
    Mounting clone database ...                               Done
    Starting database recovery ...
    Clone database sovvr is open.
    

See About storage and availability management use cases for databases


Legacy ID



uxrt-60_v71037635_uxrt-60_v72974483


Article URL http://www.symantec.com/docs/HOWTO74601


Terms of use for this information are found in Legal Notices