Home > Veritas Storage Foundation™ for DB2 Manual Pages

DB2ED_VMCHECKSNAP (1)

User Commands

Table of contents


NAME

db2ed_vmchecksnap - create and validate the snapplan used to create a clone database. The command can also be used to list, copy, and remove snapplans.

SYNOPSIS

db2ed_vmchecksnap [ -I DB2INSTANCE ] -D DB2DATABASE -f SNAPPLAN

   -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


AVAILABILITY

This command is part of Veritas Storage Foundation for DB2. To determine whether this product is installed on an \1 system, type:

lslpp -L VRTSdb2ed


DESCRIPTION

The db2ed_vmchecksnap command creates a snapplan that db2ed_vmsnap uses to create a snapshot of a DB2 database. The snapplan specifies snapshot scenarios (such as offline, online_snapshot, or online_mirror).

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.


OPTIONS

The following options are supported:
-D DB2DATABASE
Specifies the name of the DB2 database for which a snapshot image will be created.
-I DB2INSTANCE
Specifies the name of the DB2 instance.
-f SNAPPLAN
Specifies the local path or the full path of the snapplan for the DB2DATABASE database.
-o setdefaults[ ,validate ]
Creates a default snapplan. The -o setdefaults option can be used with the -o validate option to validate that the configuration is correct.
-o validate
Validates each parameter in the snapplan, checks whether the snapshot volumes have been configured correctly for creating snapshots, and copies the snapplan to the respository. The default behavior is to force validation. Use the -n option if you want to skip validation.
-o list
Lists all the snapplans associated with a specific DB2DATABASE.
-o copy | remove
The -o copy option copies the snapplan from the repository to your local directory. The -o remove option 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.
-p PLEXTAG
Specifies the tag name for the plexes used to create the snapshot.
-n
The -n option disables the VxDBA repository refresh. By default, db2ed_vmchecksnap refreshes the VxDBA repository unless this option is used.

EXAMPLES

In this example, a snapplan, snap1, is created with default values in a two-host configuration. The primary host is host1 and the secondary host is host2:

$ /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

NOTES

db2ed_vmchecksnap must be run as the DB2 instance owner in order to retrieve information from a DB2 database. Before the DB2 instance owner can use this command, however, the system administrator needs to enable Veritas Volume Manager persistent FastResync on the existing database volumes and assign disks for the snapshot volumes.

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.


SEE ALSO

db2ed_vmclonedb(1M), db2ed_vmsnap(1M), db2ed_vmsnapplan(4)

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.