Consider these notes before listing all snapplans for a specific DB2 database, displaying a snapplan file, or copying and removing snapplans.
To list all available snapplans for a specific DB2 database
Use the db2ed_vmchecksnap command as follows:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D DB2DATABASE -o list
In the following 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 - yes snap2 init_full - yes
To display detailed information for a snapplan
Use the db2ed_vmchecksnap command as follows:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D DB2DATABASE \ -f SNAPPLAN -o list
In the following example, the snapplan snap1 is displayed.
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap1 -o list SNAPSHOT_VERSION=4.0 PRIMARY_HOST=host1 SECONDARY_HOST=host1 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_VOL_PREFIX=SNAP_ ALLOW_REVERSE_RESYNC=yes SNAPSHOT_MIRROR=1 STORAGE_INFO PRODdg02 SNAP_PLEX=prod_db-02 STATUS_INFO SNAP_STATUS=init_full DB_STATUS=init LOCAL_SNAPPLAN=/export/snap_dir/snap1
To copy a snapplan from the repository to your current directory
If you want to create a snapplan similar to an existing snapplan, you can simply create a copy of the existing snapplan and modify it. To copy a snapplan from the repository to your current directory, the snapplan must not already be present in the current directory.
Use the db2ed_vmchecksnap command as follows:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D DB2DATABASE \ -f SNAPPLAN -o copy
This example shows the snapplan, snap1, being copied from the repository to the current directory.
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap1 -o copy Copying 'snap1' to '/export/snap_dir'
To remove a snapplan from the repository
A snapplan can be removed from a local directory or the repository if the snapplan is no longer needed.
Use the db2ed_vmchecksnap command as follows:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D DB2DATABASE -f SNAPPLAN \ -o remove
This example shows the snapplan, snap1, being removed from the repository.
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap1 -o remove The snapplan snap1 has been removed.