Home > Veritas Storage Foundation™ for DB2 Manual Pages
-o setdefaults[ ,validate ] -t SECONDARY_HOST -p PLEXTAG [ -n ]
db2ed_vmchecksnap -I DB2INSTANCE -D DB2DATABASE -f SNAPPLAN
-o validate [ -n ]
db2ed_vmchecksnap -D DB2DATABASE [ -f SNAPPLAN ] -o list
db2ed_vmchecksnap -D DB2DATABASE -f SNAPPLAN -o copy | remove
lslpp -L VRTSdb2ed
When you first run db2ed_vmchecksnap with the -o setdefaults option, the command creates a snapplan template with a number of variables. Some of the variables are assigned default values. You may edit the snapplan file manually to set the variables for different snapshot scenarios.
Use the -o validate option to verify that the storage and database attributes are setup as specified in the snapplan and copy them to the repository.
Snapshot plexes and their associated data change object (DCO) logs must be on different disks than the original plexes and must be configured correctly by the system administrator before creating snapshots. To verify that the plexes are configured correctly, run db2ed_vmchecksnap with the -o validate option. For more information about snapshots and DCO logs, see the Veritas Volume Manager Administrator's Guide.
Use the -o list option to list all the snapplans associated with a specific DB2DATABASE.
Use the -o list -f SNAPPLAN options to get detailed information about the snapplan.
Use the -o copy | remove option to copy the snapplan from the Veritas Storage Foundation for DB2 repository to your local directory or remove the snapplan from the repository.
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap1 -o setdefaults -t host2 -p PRODtag Snapplan snap1 for PROD. ===================================================== SNAPSHOT_VERSION=5.0 PRIMARY_HOST=host1 SECONDARY_HOST=host2 PRIMARY_DG=PRODdg SNAPSHOT_DG=SNAP_PRODdg DB2DATABASE=PROD DB2HOME=/PROD_HOME REDOLOG_DEST=/PROD_HOME/inst1/NODE0000/SQL00001/SQLOGDIR/ SNAPSHOT_MODE=online_snapshot SNAPSHOT_PLAN_FOR=database SNAPSHOT_PLEX_TAG=PRODtag SNAPSHOT_MIRROR=1 SNAPSHOT_VOL_PREFIX=SNAP_ ALLOW_REVERSE_RESYNC=no
In the following example, the snapplan, snap1, is validated for a snapshot image in a two-host configuration:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -o validate -f snap1 NOTICE: PRIMARY_HOST is host1 NOTICE: SECONDARY_HOST is host2 NOTICE: The version of PRIMARY_DG-PRODdg is 110. NOTICE: SNAPSHOT_DB is SNAP_PRODdg NOTICE: SNAPSHOT_PLAN_FOR is database Examining DB2 volume and disk layout for snapshot. NOTICE: Volume PRODvol1 on PRODdg is ready for snapshot. Original plex and DCO log for PROD is on PRODdg01. Snapshot plex and DCO log for PROD is on PRODdg02. NOTICE: SNAP_PRODdg for snapshot will include: PRODdg02 NOTICE: ALLOW_REVERSE_RESYNC is yes The snapplan snap1 has been created.
In this example, all available snapplans are listed for the database PROD:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D 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
For descriptions of the statuses that appear for SNAP_STATUS and DB_STATUS, see the Veritas Storage Foundation for DB2 Database Administrator's Guide.
In this example, the snapplan, snap1, is displayed:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap1 -o setdefaults -t host2 -p PRODtag Snapplan snap1 for PROD. ===================================================== SNAPSHOT_VERSION=5.0 PRIMARY_HOST=host1 SECONDARY_HOST=host2 PRIMARY_DG=PRODdg SNAPSHOT_DG=SNAP_PRODdg DB2DATABASE=PROD DB2HOME=/PROD_HOME REDOLOG_DEST=/PROD_HOME/inst1/NODE0000/SQL00001/SQLOGDIR/ SNAPSHOT_MODE=online_snapshot SNAPSHOT_PLAN_FOR=database SNAPSHOT_PLEX_TAG=PRODtag SNAPSHOT_MIRROR=1 SNAPSHOT_VOL_PREFIX=SNAP_ ALLOW_REVERSE_RESYNC=yes STORAGE_INFO PRODdg02 SNAP_PLEX=prod_db-02 STATUS_INFO SNAP_STATUS=init_full DB_STATUS=init LOCAL_SNAPPLAN=/export/snap_dir/snap1
The db2ed_vmchecksnap command runs without interaction from the user.
To take an online snapshot or online mirror of the database, the database needs to be running in archive log mode. If you are using online_mirror, the primary and secondary hosts must be the same. This option creates a backup image of the database that can be used to overwrite the primary database in the event that it becomes corrupted. The online_mirror option does not support database cloning. To take an offline snapshot, the primary and secondary hosts must not be the same.
It is recommended that you create a local working directory to store your snapplans in. If a snapplan is updated or modified, you must re-validate it.
Veritas Storage Foundation for DB2 Administrator's Guide
Veritas Volume Manager Administrator's Guide
Last updated: 13 Dec 2004
Copyright ©2009 Symantec Corporation
All rights reserved.