Friday 3 May 2013

Redirect Restore

1) Redirect restore of the database using version recovery
a) DB is enable for archival logging.

b) Perform offline backup of the database

Offline backup is needed when the current database has to be redirected restore.(Requires, only the Offline backup image)
Online backup can also be used, but transaction done during the online backup needs to be rollforward(Requires, Online Backup image + Archive/Active Log file)c) Performing recovery of database

Version recovery if offline backup is used
Roll-forward recovery if online backup is usedd) Activate the database



2) Restore a failed Tablespace (Non-SYSCAT)

A) Restore failed tablespace from the available backup imagea) Identify the tablespace that is failed

ADMIN NOTIFICATION FILE
db2pd -tablespace -db sample
b) Restore the tablespace from the available backup image

db2 restore db sample tablespace (userspace1) online
c) Rollforward the tablespace to end of logs

db2 "rollforward db sample to end of logs tablespace(userspace1) online"
d) Optional. Take backup of database or backup of the restored tablespace

B) Backup image is not available for the failed tablespace
a) Identify the tablespace that is failed

ADMIN NOTIFICATION FILE
db2pd -tablespace -db sample
b) Check the create time of the failed tablespace

db2 "select varchar(TBSPACE,40),CREATE_TIME from syscat.tablespaces order by CREATE_TIME desc"
c) Check the available backup image
$==> db2 list history backup all for db <dbname>

No comments:

Post a Comment