Home > Veritas Storage Foundation™ for DB2 Manual Pages
DB2ED_CLONEDB (1) |
User Commands |
db2ed_clonedb [ -I SOURCE_INSTANCE ] -S SOURCE_DATABASE
[ -T TARGET_DATABASE ] -c CKPT_NAME -m MOUNT_POINT [ -l TARGET_DATABASE_REDOLOG_DIRECTORY ] [ -i | a RECOVERY_LOG_LOCATION ] [ -h ]
To restart,unmount or remove a clone database:
db2ed_clonedb -o umount | restartdb [-d] [-h]
lslpp -L VRTSdb2ed
The db2ed_clonedb command must be run from the target instance. The target environment must be configured correctly for the primary database. Be sure you have enough space to create a clone instance on your system.
db2ed_clonedb creates a mounted, writable clone of an DB2 database. The new database is given a new name and mount point, as specified by arguments to the command. The db2ed_clonedb command is designed to work with a mounted,writable Storage Checkpoint of a DB2 database. If the Storage Checkpoint is already mounted, the mount point should be identical to that used to mount the Storage Checkpoint. If the Storage Checkpoint has not been mounted (for example, using the db2ed_ckptmount command), db2ed_clonedb will automatically mount the Storage Checkpoint as read-write at the specified mount point. The new DB2 database is given a new name and containers are given a new location, as specified by arguments to db2ed_clonedb.
Options -I, -S, -T, -c, -m, and -l are specified for the cloning function. Options -a and -i are specified to define recovery behavior. No recovery operation is possible if neither the -a nor the -i option is defined.
If the -a option is specified, db2ed_clonedb will perform cloning and attempts to do a minimum recovery automatically by accessing the archived log without user interaction. The estimated minimum required archive logs will be played back for the recovery process. If the -i option is specified, db2ed_clonedb will prompt you to complete the DB2 recovery process with the new database. This allows you the option of performing point-in-time recovery or a complete recovery. For information about DB2 recovery, see the documentation for your version of DB2.
For an online Storage Checkpoint (that is, one that was created when the database was active), the user will be prompted for the archived log location and asked whether they want to do a minimum recovery or a complete recovery.
For an offline Storage Checkpoint (that is, one that was created when the database was inactive), the database wil be ready after db2ed_clonedb finishes and no recovery process is needed.
For an offline Storage Checkpoint, the -a option is ignored since the database is ready after db2ed_clonedb finishes and no recovery processs is necessary. For an online Storage Checkpoint, db2ed_clonedb tries to recover the database and displays DB2 error messages if it cannot find or access the log.
If neither the -i or -a options are specified, db2ed_clonedb clones the database and no recovery process is initiated.
db2ed_clonedb only works when the instance is up.
To clone a DB2 instance with manual DB2 recovery:
$ /opt/VRTS/bin/db2ed_clonedb -S PROD -T PRODclone \.br -c Checkpoint_1049927758 -m /db2clone/target_db1
To clone a DB2 instance with automatic DB2 recovery:
$ /opt/VRTS/bin/db2ed_clonedb -S PROD -T PRODclone \.br -c Checkpoint_1049927758 -m /db2clone/target_db2 \.br -a /db2clone/db2inst1/NODE0000/SQL00002/SQLOGDIR/
To clone a DB2 instance with interactive DB2 recovery:
$ /opt/VRTS/bin/db2ed_clonedb -S PROD -T PRODclone \.br -c Checkpoint_1049927758 -m /db2clone/target_db3 -i
Veritas Storage Foundation for DB2 Administrator's Guide
Last updated: 13 Dec 2004
Copyright ©2009 Symantec Corporation
All rights reserved.