Deletes entries from the recovery history file.
Authorization
One of the following:
Required Connection
Database. To delete entries from the recovery history file for any database other than the default database, a connection to the database must be established before calling this API.
Version
db2ApiDf.h
C API Syntax
/* File: db2ApiDf.h */ /* API: Prune Recovery History File */ /* ... */ SQL_API_RC SQL_API_FN db2Prune ( db2Uint32 version, void * pDB2PruneStruct, struct sqlca * pSqlca); typedef struct { char * piString, db2Uint32 iEID, db2Uint32 iCallerAction, db2Uint32 iOptions } db2PruneStruct; /* ... */ |
Generic API Syntax
/* File: db2ApiDf.h */ /* API: Prune Recovery History File */ /* ... */ SQL_API_RC SQL_API_FN db2GenPrune ( db2Uint32 version, void * pDB2GenPruneStruct, struct sqlca * pSqlca); typedef struct { db2Uint32 iStringLen; char * piString, db2Uint32 iEID, db2Uint32 iCallerAction, db2Uint32 iOptions } db2GenPruneStruct; /* ... */ |
API Parameters
This parameter can also be used to pass an LSN, so that logs can be pruned on a mobile workstation.
REXX API Syntax
PRUNE RECOVERY HISTORY BEFORE :timestamp [WITH FORCE OPTION] |
REXX API Parameters
Usage Notes
Pruning the history file does not delete the actual backup or load files. The user must manually delete these files to free up the space they consume on storage media.
Attention: If the latest full database backup is deleted from the media (in addition to being pruned from the history file), the user must ensure that all table spaces, including the catalog table space and the user table spaces, are backed up. Failure to do so may result in a database that cannot be recovered, or the loss of some portion of the user data in the database.
See Also
db2HistoryCloseScan - Close Recovery History File Scan
db2HistoryGetEntry - Get Next Recovery History File Entry
db2HistoryOpenScan - Open Recovery History File Scan
db2HistoryUpdate - Update Recovery History File.