Queries the database history and generates a list of timestamps for the backup images that are required for an incremental restore. A simplified restore syntax for a manual incremental restore is also generated.
None
None
>>-db2ckrst-- -d--database name-- -t--timestamp-----------------> >--+---------------------+--+--------------------------+--------> | .-database---. | | .-----------------. | '- -r--+-tablespace-+-' | V | | '- -n----tablespace name-+-' >--+-----+----------------------------------------------------->< +- -h-+ +- -u-+ '- -?-'
db2ckrst -d mr -t 20001015193455 -r database
db2ckrst -d mr -t 20001015193455 -r tablespace
db2ckrst -d mr -t 20001015193455 -r tablespace -n tbsp1 tbsp2
> db2 backup db mr
Backup successful. The timestamp for this backup image is : 20001016001426
> db2 backup db mr incremental
Backup successful. The timestamp for this backup image is : 20001016001445
> db2ckrst -d mr -t 20001016001445
Suggested restore order of images using timestamp 20001016001445 for
database mr.
===================================================================
db2 restore db mr incremental taken at 20001016001445
db2 restore db mr incremental taken at 20001016001426
db2 restore db mr incremental taken at 20001016001445
===================================================================
> db2ckrst -d mr -t 20001016001445 -r tablespace -n userspace1
Suggested restore order of images using timestamp 20001016001445 for
database mr.
===================================================================
db2 restore db mr tablespace ( USERSPACE1 ) incremental taken at
20001016001445
db2 restore db mr tablespace ( USERSPACE1 ) incremental taken at
20001016001426
db2 restore db mr tablespace ( USERSPACE1 ) incremental taken at
20001016001445
===================================================================
The db2ckrst utility will not be enhanced for the rebuilding of a database. Due to the constraints of the history file, the utility will not be able to supply the correct list if several table spaces need to be restored from more than one image.
The database history must exist in order for this utility to be used. If the database history does not exist, specify the HISTORY FILE option in the RESTORE command before using this utility.
If the FORCE option of the PRUNE HISTORY command is used, you can delete entries that are required for automatic incremental restoration of databases. Manual restores will still work correctly. Use of this command can also prevent the db2ckrst utility from being able to correctly analyze the complete chain of required backup images. The default operation of the PRUNE HISTORY command prevents required entries from being deleted. It is recommended that you do not use the FORCE option of the PRUNE HISTORY command.
This utility should not be used as a replacement for keeping records of your backups.