Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Creating and Working with Snapplans Using dbed_vmchecksnap

A snapplan specifies snapshot scenarios for an Oracle database (such as online, instant, or offline). You can name a snapplan file whatever you choose. You can use the dbed_vmchecksnap -o setdefaults option to create the snapplan and set default values for the parameters. You may then modify the snapplan file using a text editor.

You can also use the command to validate, copy, list, or remove a snapplan and check the storage to make sure it is configured appropriately for the Database FlashSnap feature. For more information on snapplans, see Validating a Snapplan (dbed_vmchecksnap).


Note   Note    You must have the Enterprise Edition of VERITAS Storage Foundation for Oracle to use this command.

Snapplan Parameters

When using dbed_vmchecksnap -o setdefaults option to create the snapplan, the following parameters are set:

Parameter Value

SNAPSHOT_VERSION

Specifies the snapshot version for this release of VERITAS Storage Foundation for Oracle

PRIMARY_HOST

Specifies the name of the host where the primary database resides.

SECONDARY_HOST

Specifies the name of the host where the clone database will reside. If the primary and secondary hosts are the same, the snapshot volumes will not be deported.

PRIMARY_DG

Specifies the name of the Volume Manager disk group used by the primary database.

SNAPSHOT_DG

Specifies the name of the disk group containing the snapshot volumes.

The snapshot volumes will be put into this disk group on the primary host and deported if the primary and secondary hosts are different. The secondary host will import this disk group to start a clone database.

ORACLE_SID

The name of the Oracle database.

ARCHIVELOG_DEST

Specifies the full path of the archive logs.

There are several archive log destinations that can be used for database recovery if you are multiplexing the archive logs. You must specify which archive log destination to use.

It is recommended that you have the archive log destination on a separate volume if SNAPSHOT_ARCHIVE_LOG is yes.

SNAPSHOT_ARCHIVE_LOG

yes or no

Specifies whether to create a snapshot of the archive log volumes. Specify yes to split the archive log volume mirrors and deport them to the secondary host. When using the Oracle remote archive log destination feature to send the archive logs to the secondary host, you can specify no to save some space.

Because the archive logs may not always be delivered to the secondary host reliably, it is recommended that you specify yes.

SNAPSHOT_MODE

online or offline or instant

Specifies whether the database snapshot should be online, offline, or instant.

If the snapshot is created while the database is online, the dbed_vmsnap command will put the tablespaces into backup mode. After dbed_vmsnap finishes creating the snapshot, it will take the tablespaces out of backup mode, switch the log files to ensure that the extra redo logs are archived, and create a snapshot of the archived logs.

If the database if offline, it is not necessary to put the tablespaces into backup mode.

If the snapshot mode is instant, a snapshot will be taken regardless of whether the database is online or offline. If it is online dbed_vmsnap will skip putting the tablespace into backup mode.



Note    If SNAPSHOT_MODE is set to offline or instant, a two-host configuration is required and the -r relocate_path option is not allowed.

SNAPSHOT_PLAN_FOR

The default value is database and cannot be changed.

Specifies the database object for which you want to create a snapshot.

SNAPSHOT_PLEX_TAG

Specifies the name of the tag set to the plexes that will be used by dbed_vmsnap to take the snapshot. The dbed_vmchecksnap command will use this tag name to search if all the volumes in the database have the plexes with this tag name set.

By default, SNAPSHOT_PLEX_TAG=dbed_flashsnap.

SNAPSHOT_VOL_PREFIX

Specifies the snapshot volume prefix. Use this variable to specify a prefix for the snapshot volumes split from the primary disk group. A volume name cannot be more than 32 characters.

ALLOW_REVERSE_RESYNC

yes or no

By default, reverse resynchronization is off (set equal to no). If it is set to yes, this parameter allows you to restore the original volume from a snapshot. The original database, however, must be down for this operation.

SNAPSHOT_MIRROR

Specifies the number of plexes to be snapshot. The default value is 1.

Creating a Snapplan


Prerequisites

  • You must be the Oracle database administrator.
  • The disk group must be version 110 or later. For more information on disk group versions, see the vxdg(1M) manual page.
  • Be sure that a DCO and DCO volume are associated with the volume for which you are creating the snapshot.
  • Snapshot plexes and their associated DCO logs should be on different disks than the original plexes, and should be configured correctly for creating snapshots by the system administrator.
  • Persistent FastResync must be enabled on the existing database volumes and disks must be assigned for the snapshot volumes.
  • The database must be running in archive log mode. Archive log mode is set in the Oracle initialization parameter file (init.ora).
  • ORACLE_HOME cannot reside on disk which will be used for snapshot.
  • QuickLog must be disabled before creating a snapplan.


Usage Notes

  • The snapplan must be created on the primary host.
  • After creating the snapplan using the dbed_vmchecksnap command, you can use a text editor to review and update the file, if necessary.
  • It is recommended that you create a local working directory to store your snapplans in.
  • See the dbed_vmchecksnap(1M) online manual page for more information.
  • If the SNAPSHOT_MODE for the database is set to online, the primary and secondary hosts can be the same. If the SNAPSHOT_MODE is set to offline or instant, the primary and secondary hosts must be different.


Options

-S

Specifies the ORACLE_SID, which is the name of the Oracle database, for which a snapshot image will be created.

-H

Specifies the Oracle home directory that corresponds to the ORACLE_SID.

-f SNAPPLAN

Specifies the local path or the full path of the snapplan that you are creating.

-o setdefaults

Creates a default snapplan. This option can be used with the -o validate option to validate that the configuration is correct. See Summary of Database Snapshot Steps for descriptions of the snapplan parameters.

-o validate

Validates each parameter in the snapplan and checks whether the snapshot volumes have been configured correctly for creating snapshots, and copies the snapplan to the repository.

-o list

Lists all the snapplans associated with a specific $ORACLE_SID.

-o copy

Copies the snapplan from the repository to your current local directory.

-o remove

Removes the snapplan from the repository and your local directory.

-t SECONDARY_HOST

Specifies the name of the host to which the snapshot image will be deported. If it is the same as the primary server, the snapshot volumes will not be deported. This argument is required if -o setdefaults is used. It is ignored if specified for -o validate.

[-p PLEX_TAG]

Specifies the tag name for the plexes used to create the snapshot. If it is not specified, dbed_flashsnap is used as the default plex tag.

  To create a snapplan and set the default values for a single host

Use the dbed_vmchecksnap command as follows:


 $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -H /oracle/product/9i \
 -f snap1 -o setdefaults -t host1 
 SNAPSHOT_VERSION=4.0
 PRIMARY_HOST=host1
 SECONDARY_HOST=host1
 PRIMARY_DG=PRODdg
 SNAPSHOT_DG=SNAP_PRODdg
 ORACLE_SID=PROD
 ARCHIVELOG_DEST=/prod_ar
 SNAPSHOT_ARCHIVE_LOG=yes
 SNAPSHOT_MODE=online
 SNAPSHOT_PLAN_FOR=database
 SNAPSHOT_PLEX_TAG=dbed_flashsnap
 SNAPSHOT_VOL_PREFIX=SNAP_
 ALLOW_REVERSE_RESYNC=no
 SNAPSHOT_MIRROR=1

  To create a snapplan and set the default values in a two-host configuration

Use the dbed_vmchecksnap command as follows:


$ /opt/VRTS/bin/dbed_vmchecksnap -S PROD \
-H /oracle/product/9i -f snap2 -o setdefaults -t host2

 Snapplan snap2 for PROD.
 =====================================================
 SNAPSHOT_VERSION=4.0
 PRIMARY_HOST=host1
 SECONDARY_HOST=host2
 PRIMARY_DG=PRODdg
 SNAPSHOT_DG=SNAP_PRODdg
 ORACLE_SID=PROD
 ARCHIVELOG_DEST=/mytest/arch
 SNAPSHOT_ARCHIVE_LOG=yes
 SNAPSHOT_MODE=online
 SNAPSHOT_PLAN_FOR=database
 SNAPSHOT_PLEX_TAG=dbed_flashsnap
 SNAPSHOT_VOL_PREFIX=SNAP_
 ALLOW_REVERSE_RESYNC=no
 SNAPSHOT_MIRROR=1

Validating a Snapplan

You can use the the dbed_vmchecksnap command with the -o validate option to validate a snapplan and check the storage to make sure it is configured appropriately for the Database FlashSnap feature.

  To validate a snapplan for a snapshot image to be used on the primary host

Use the dbed_vmchecksnap command as follows:


 $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -H /oracle/product/9i \
 -f snap1 -o validate
 PRIMARY_HOST is host1
 
 SECONDARY_HOST is host1
 
 The version of PRIMARY_DG-PRODdg is 110.
 
 SNAPSHOT_DG is SNAP_PRODdg
 
 SNAPSHOT_MODE is online
 
 The database is running in archivelog mode.
 
 ARCHIVELOG_DEST is /prod_ar
 
 SNAPSHOT_PLAN_FOR is database
 
 SNAPSHOT_ARCHIVE_LOG is yes
 
 ARCHIVELOG_DEST=/prod_ar is mount on /dev/vx/dsk/PRODdg/prod_ar.
 
 Examining Oracle volume and disk layout for snapshot
 
 Volume prod_db on PRODdg is ready for snapshot. 
 Original plex and DCO log for prod_db is on PRODdg01. 
 Snapshot plex and DCO log for prod_db is on PRODdg02. 
 
 SNAP_PRODdg for snapshot will include: PRODdg02
 
 ALLOW_REVERSE_RESYNC is yes
 
 The snapplan snap1 has been created.

  To validate a snapplan for a snapshot image to be used on the secondary host

Use the dbed_vmchecksnap command as follows:


$ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -H \
/oracle/product/9i -f snap2 -o validate

 PRIMARY_HOST is host1
 
 SECONDARY_HOST is host2
 
 The version of PRIMARY_DG-PRODdg is 110.
 
 SNAPSHOT_DG is SNAP_PRODdg
 
 SNAPSHOT_MODE is online
 
 The database is running in archivelog mode.
 
 ARCHIVELOG_DEST is /mytest/arch
 
 SNAPSHOT_PLAN_FOR is database
 
 SNAPSHOT_ARCHIVE_LOG is yes
 
 ARCHIVELOG_DEST=/mytest/arch is mount on /dev/vx/dsk/PRODdg/arch.
 
 Examining Oracle volume and disk layout for snapshot.
 
 Volume prod_db on PRODdg is ready for snapshot. 
 Original plex and DCO log for prod_db is on PRODdg01. 
 Snapshot plex and DCO log for prod_db is on PRODdg02. 

 SNAP_PRODdg for snapshot will include: PRODdg02
 
 ALLOW_REVERSE_RESYNC is yes
 
 The snapplan snap2 has been created.

Listing and Viewing Snapplans Using dbed_vmchecksnap

  To list all available snapplans for a specific Oracle database

Use the dbed_vmchecksnap command as follows:


 $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -o list
 
 The following snapplan(s) are available for PROD:
 
 SNAP_PLAN          SNAP_STATUS            DB_STATUS          SNAP_READY
 snap1         init_full           init          yes
 snap2         init_full           init          yes
 snap3         init_full           init          yes
Note   Note    The command output displays all available snapplans, their snapshot status (SNAP_STATUS), database status (DB_STATUS), and whether a snapshot may be taken (SNAP_READY). For explanations of the various statuses that may appear for SNAP_STATUS and DB_STATUS, refer to VERITAS Database FlashSnap Status Information.

  To view a snapplan

Use the dbed_vmchecksnap command as follows:


 $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -f snap1 -o list
 SNAPSHOT_VERSION=4.0
 PRIMARY_HOST=host1
 SECONDARY_HOST=host1
 PRIMARY_DG=PRODdg
 SNAPSHOT_DG=SNAP_PRODdg
 ORACLE_SID=PROD
 ARCHIVELOG_DEST=/prod_ar
 SNAPSHOT_ARCHIVE_LOG=yes
 SNAPSHOT_MODE=online
 SNAPSHOT_PLAN_FOR=database
 SNAPSHOT_PLEX_TAG=dbed_flashsnap
 SNAPSHOT_VOL_PREFIX=SNAP_
 ALLOW_REVERSE_RESYNC=yes
 SNAPSHOT_MIRROR=1
 
 STORAGE_INFO
 PRODdg02
 SNAP_PLEX=prod_db-02 prod_ar-02

 STATUS_INFO
 SNAP_STATUS=init_full
 DB_STATUS=init
 LOCAL_SNAPPLAN=/export/snap_dir/snap1

Copying or Removing a Snapplan Using dbed_vmchecksnap

  To copy a snapplan from the VxDBA repository to your local directory

To copy a snapplan from the VxDBA repository to your local directory, the snapplan must not already be present in your local directory.

Use the dbed_vmchecksnap command as follows:


 $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -f snap1 -o copy
 Copying 'snap1' to '/export/snap_dir'

  To remove a snapplan

Use the dbed_vmchecksnap command as follows:


 $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -f snap1 -o remove
 The snapplan snap1 has been removed from VxDBA repository.
 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com