Symantec logo

Creating a snapplan (dbed_vmchecksnap)

The dbed_vmchecksnap command creates a snapplan that dbed_vmsnap uses to create a snapshot of an Oracle database. The snapplan specifies snapshot scenarios (such as online, offline, or instant ).

You can name a snapplan file whatever you choose. Each entry in the snapplan file is a line in parameter=argument format.

When using dbed_vmchecksnap to create or validate a snapplan, the following parameters are set:

Parameter values for dbed_vmchecksnap

Parameter

Value

SNAPSHOT_VERSION 

Specifies the snapshot version for this major release of Storage Foundation 5.0 for Oracle RAC. 

PRIMARY_HOST 

The name of the host where the primary database resides. 

SECONDARY_HOST 

The name of the host where the database will be imported.  

PRIMARY_DG 

The name of the VxVM disk group used by the primary database. 

SNAPSHOT_DG 

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. The secondary host will import this disk group to start a clone database. 

ORACLE_SID 

The name of the Oracle database. By default, the name of the Oracle database is included in the snapplan. 

ARCHIVELOG_DEST 

The full path of the archive logs.  

There are several archive log destinations that can be used for database recovery if you are muliplexing 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. The database must be shut down before creating an offline snapshot. 

If the database snapshot is instant, 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 snapshot plex tag. Use this variable to specify a tag for the plexes to be snapshot. The maximum length of the plex_tag is 15 characters. The default plex tag is 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. You should consider the length of the volume name when assigning the prefix. 

ALLOW_REVERSE_RESYNC 

yes or no 

By default, reverse resynchronization is off (set equal to no). If it is set to yes, data from the snapshot volume can be used to update the primary volume. 

SNAPSHOT_MIRROR 

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

When you first run dbed_vmchecksnap, use the -o setdefaults option to create a snapplan using default values for variables. You may then edit the file manually to set the variables for different snapshot scenarios.


  Note   You cannot access Database FlashSnap commands (dbed_vmchecksnap, dbed_vmsnap, and dbed_vmclonedb) with the SFDB menu utility.


Before creating a snapplan, make sure the following conditions have been met:

Prerequisites 

  • Storage must be configured as specified inPreparing hosts and storage for Database FlashSnap.
  • 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).
  • The Oracle database must have at least one mandatory archive destination.

    See Establishing a mandatory archive destination.

  • ORACLE_HOME cannot reside on disk which will be used for snapshot.

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.

 To create a snapplan

  1. Change directories to the working directory you want to store your snapplan in.

    $ cd /working_directory

  2. Create a snapplan with default values using the dbed_vmchecksnap command:

    $ /opt/VRTS/bin/dbed_vmchecksnap -S ORACLE_SID \
    -H ORACLE_HOME -f SNAPPLAN -o setdefaults -t host_name \
    [-p PLEX_TAG]

  3. Open the snapplan file in a text editor and modify it as needed.

In this example, a snapplan, snap1, is created for a snapshot image in a single-host configuration and default values are set. The host is named host1 and the working directory is /export/snap_dir.

$ cd /export/snap_dir

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

Snapplan snap1 for PROD.

=====================================================

SNAPSHOT_VERSION=5.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

In this other example, a snapplan, snap2, is created for a snapshot image in a two-host configuration, and default values are set. The primary host is host1, the secondary host is host2, and the working directory is /export/snap_dir.

$ cd /export/snap_dir

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

Snapplan snap2 for PROD.

=====================================================

SNAPSHOT_VERSION=5.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

By default, a snapplan's SNAPSHOT_PLEX_TAG value is set as dbed_flashsnap. You can use the -p option to assign a different tag name. Make use of the -p option when creating the snapplan with the setdefaults option.

In the following example, the -p option is used with setdefaults to assign my_tag as the SNAPSHOT_PLEX_TAG value.

# dbed_vmchecksnap -S $ORACLE_SID -H $ORACLE_HOME -O setdefaults \
-p my_tag -f snap1 -t PROD

Snapplan snap1 for PROD

=====================================================

SNAPSHOT_VERSION=5.0

PRIMARY_HOST=host1

SECONDARY_HOST=host2

PRIMARY_DG=PRODdg

SNAPSHOT_DG=SNAP_PRODdg

ORACLE_SID=PROD

ARCHIVELOG_DEST=/arch_data

SNAPSHOT_ARCHIVE_LOG=yes

SNAPSHOT_MODE=online

SNAPSHOT_PLAN_FOR=database

SNAPSHOT_PLEX_TAG=my_tag

SNAPSHOT_VOL_PREFIX=SNAP_

ALLOW_REVERSE_RESYNC=no

SNAPSHOT_MIRROR=1