RecoverDB2

From Tranzman Documentation
Revision as of 08:55, 19 September 2018 by Admin (talk | contribs)
Jump to: navigation, search

Steps to be followed after importing the images to NBU

In the following example, there is a database called sample ; the recovery logs are included in the backup image; the database is restored; and the database is rolled forward to the end of backup timestamp.

Step 1

Restore the image on the DB2 client as a file.

Step 2

Filename will have a naming convention as shown below.

e.g. SAMPLE.0.DB2.NODE0000.CATN000.20180523164142.001

Database Name is Sample Instance Name is DB2 Timestamp is 20180523164142 Catalog Name is CATN000

Step 3

Restore the database. The example below restores the database SAMPLE from location in "C:\Backup"

> db2 => RESTORE DATABASE SAMPLE FROM "C:\Backup" TAKEN AT 20180627095334 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING

Step 4

Roll the logs forward to the end of the backup to make sure the database is in a consistent state.

> db2 rollforward db sample to end of backup

Note : If log files are not included in backup images , the rollforward recovery needs to be done as per the method used for backing up logs.


Use this link to go back to the main recoverydocs Page.