For optimal DB2 recovery, follow these guidelines:
Ensure that the LOGRETAIN and/or USEREXIT database configuration parameters are enabled. Enabling these parameters makes the following roll-forward recovery techniques available for use:
Point in time recovery using the ROLLFORWARD DATABASE command
Online processing of BACKUP and RESTORE DATABASE commands
When LOGRETAIN is enabled, log files are not overwritten when they become inactive. When USEREXIT is enabled, DB2 will call the user exit program when a log file is ready for archiving.
You must have SYSADM, SYSCTRL, or SYSMAINT authority to use the ROLLFORWARD DATABASE command.
A database must be restored successfully (using the RESTORE DATABASE command) before it can be rolled forward.
After Storage Rollback, perform DB2 recovery, applying some or all of the archived redo logs.
To perform a point-in-time recovery, use:
db2rollforward database database_name to PIT
Where PIT is the point in time you are rolling forward to. The point in time must be specified in UTC or local time.
An example of how to use the db2rollforward command using local time:
db2rollforward database db to yyyy-mm-dd-hh.mm.ss.nnnnnn using local time
See your DB2 documentation for complete information on recovery.