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.
Table: Parameter values for dbed_vmchecksnap shows which parameters are set when using dbed_vmchecksnap to create or validate a snapplan.
Table: Parameter values for dbed_vmchecksnap
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.
Before creating a snapplan, make sure the following conditions have been met:
Prerequisites |
|
Usage notes |
|
To create a snapplan
Change directories to the working directory you want to store your snapplan in.
$ cd /working_directory
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]
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 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. Use 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 host2
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
More Information