Command Reference
Used to delete entries from the recovery history file, or to delete log
files from the active log file path.
Authorization
One of the following:
- sysadm
- sysctrl
- sysmaint
- dbadm
Required Connection
Database
Command Syntax
>>-PRUNE----+-HISTORY--timestamp----+--------------------+-+---><
| '-WITH FORCE OPTION--' |
'-LOGFILE PRIOR TO--log-file-name--------------'
Command Parameters
- HISTORY timestamp
- Identifies a range of entries in the recovery history file that will be
deleted. A complete time stamp (in the form yyyymmddhhmmss),
or an initial prefix (minimum yyyy) can be specified. All
entries with time stamps equal to or less than the time stamp provided are
deleted from the recovery history file.
- WITH FORCE OPTION
- Specifies that the entries will be pruned according to the time stamp
specified, even if some entries from the most recent restore set are deleted
from the file. A restore set is the most recent full database backup
including any restores of that backup image. If this parameter is not
specified, all entries from the backup image forward will be maintained in the
history.
- LOGFILE PRIOR TO log-file-name
- Specifies a string for a log file name, for example
S0000100.LOG. All log files prior to (but not
including) the specified log file will be deleted. The LOGRETAIN
database configuration parameter must be set to RECOVERY or
CAPTURE.
Examples
To remove the entries for all restores, loads, table space backups, and
full database backups taken before and including December 1, 1994 from the
recovery history file, enter:
db2 prune history 199412
Note: | 199412 is interpreted as 19941201000000.
|
Usage Notes
Pruning backup entries from the history file causes related file backups on
DB2 Data Links Manager servers to be deleted.
[ Top of Page | Previous Page | Next Page ]