版次注意事項


10.3 db2ckrst (new command)

db2ckrst - Check Incremental Restore Image Sequence

Queries the database history and generates a list of timestamps for the backup images required for an incremental restore. A simplified restore syntax for a manual incremental restore is also generated.

Authorization

None

Required Connection

None

Command Syntax

>>-db2ckrst----d--database name----t--timestamp----------------->
 
>-----+---------------------+---+-----------------------------+->
      |     .-database---.  |   |     .--------------------.  |
      '--r--+-tablespace-+--'   |     V                    |  |
                                '--n-----tablespace name---+--'
 
>-----+----+---------------------------------------------------><
      +--h-+
      +--u-+
      '--?-'
 

Command Parameters

-d database namefile-name
Specifies the alias name for the database that will be restored.

-t timestamp
Specifies the timestamp for a backup image that will be incrementally restored.

-r
Specifies the type of restore that will be executed. The default is database.

Note:
If tablespace is chosen and no table space names are given, the utility looks into the history entry of the specified image and uses the table space names listed to do the restore.

-n tablespace name
Specifies the name of one or more table spaces that will be restored.

Note:
If a database restore type is selected and a list of table space names is specified, the utility will continue as a tablespace restore using the table space names given.

-h/-u/-?
Displays help information. When this option is specified, all other options are ignored, and only the help information is displayed.

Examples

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
===================================================================

Usage Notes

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, it will be possible to delete entries that are required for recovery from the most recent, full database backup image. The default operation of the PRUNE HISTORY command prevents required entries from being deleted. It is recommended that the FORCE option of the PRUNE HISTORY command not be used.

|It is recommended that you keep good records of your backups |and use this utility as a guide.


[ 頁面頂端 | 前一頁 | 下一頁 | 目錄 | 索引 ]