Sunteți pe pagina 1din 2

Command Line Re-directed Restore:

Execute the following commands on the destination client:


db2 update db cfg for ${DB2DBDFT} using VENDOROPT "'CvSrcClientName=${CVNAME},CvSrcDB2InstanceName=db2xxx,CvClientName=${CVNAME},CvInstanceName=Instance001'"
db2 update db cfg for ${DB2DBDFT} using LOGARCHOPT1 "'CvSrcClientName=${CVNAME},CvSrcDB2InstanceName=db2xxx,CvClientName=${CVNAME},CvInstanceName=Instance001'"
db2 update db cfg for ${DB2DBDFT} using LOGARCHMETH1 VENDOR:/opt/simpana/Base64/libDb2Sbt.so

Shutdown DB2
shutdown_DB2
Restart DB2
db2start
Execute log_config to verify update commands above:
log_config

Execute the Restore command(s) on the destination client:


***************************************************************************************************************************************************************************
XXX = Source dbname
DEST = Destination dbname
CV Shared Object is located on /opt/simpana/Base64/libDb2Sbt.so (for brand new CV10 installs it could be located on /opt/cvlt/simpana/Base64.libDb2Sbt.so)
# of SESSIONS (X) - can be found in CV under Source CVNAME – Source Subclient Name XXXHOT – Right click Properties – General Tab – Number of Data Backup Streams value
TAKEN AT - timestamp can be found by executing the db_backups command on the Source instance as the db2xxx user. (Use the START_TIME value)
ON - syntax is based on the number of sapdata directories of the Destination Instance
DBPATH ON - is the Destination dbname
INTO - is the Destination dbname
***************************************************************************************************************************************************************************
db2 -t "RESTORE DATABASE XXX
load /opt/simpana/Base64/libDb2Sbt.so
OPEN X SESSIONS
TAKEN AT YYYYMMDDHHMMSS
ON /db2/DEST/sapdata4
,/db2/DEST/sapdata3
,/db2/DEST/sapdata2
,/db2/DEST/sapdata1
DBPATH ON /db2/DEST
INTO DEST
WITH 2 BUFFERS
BUFFER 1024
replace history file
REDIRECT without prompting;"

You will get the following message if successful:


SQL1277W A redirected restore operation is being performed. During a table
space restore, only table spaces being restored can have their paths
reconfigured. During a database restore, storage group storage paths and DMS
table space containers can be reconfigured.
DB20000I The RESTORE DATABASE command completed successfully.

Continue with the restore


Execute the following command:
db2 "restore database XXX continue"

You will see process(es) in CV10 Job Controller under Phase Data Restore.
Once the restore completes you will get the following message if successful:
DB20000I The RESTORE DATABASE command completed successfully.

At this point you would have to scp logs from the Source to the Destination to complete the recovery to a specific time.
/db2/XXX/log_archive/db2xxx/XXX/NODE0000/C0000000
To the Destination directory:
/db2/DEST/log_retrieve/NODE0000/LOGSTREAM0000

Rollforward the DB to PIT


db2 "rollforward database DEST to YYYY-MM-DD-HH.MM.SS.000000 using local time and stop"
db2 "rollforward database DEST complete"

Set DB2 Parameters back to DEST DB settings


db2 update db cfg for ${DB2DBDFT} using VENDOROPT "'CvClientName=${CVNAME},CvInstanceName=Instance001'"
db2 update db cfg for ${DB2DBDFT} using LOGARCHOPT1 "'CvClientName=${CVNAME},CvInstanceName=Instance001'"

Shutdown DB2
shutdown_DB2
Restart DB2
Startup_DB2

Execute log_config to verify update commands above:


log_config

Continue on with normal refresh steps to change tablespace names etc…………

S-ar putea să vă placă și