Why the Db2LUW Recover Database is not being able to pickup latest backup image
Biswarup(Bis)Mukherjee 120000HKTY Visits (261)
The simplest form of recover database command,
db2 recover database <db-name>
recover the latest backup image and rollforward to the end of logs using all default settings.
The complain is why this command is not picking up the latest backup image.
The reason is mostly on history file as recover database depend on history file to pickup the backup images.
In this specific customer situation there was system restore happened which overwritten the latest history file.
As a result recover database had no idea about the last backup image.
To overcome from this problem just restore the latest history file from the latest backup and then recover database will work properly.
Alternately if the history file is saved separately somewhere then that could be chosen with USING HISTORY FILE option in the command option.
Similarly, if a need is there to run recover database to recover a very old backup then a old history file needed to be located first and then the recover database
could be run using that history file.