IBM Books

Administrative API Reference

db2HistoryUpdate - Update Recovery History File

Updates the location, device type, or comment in a history file entry.

Authorization

One of the following:

Required Connection

Database. To update entries in the history file for a 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: Update Recovery History File */
/* ... */
SQL_API_RC SQL_API_FN
  db2HistoryUpdate (
    db2Uint32 version,
    void * pDB2HistoryUpdateStruct,
    struct sqlca * pSqlca);
 
typedef struct
{
  char * piNewLocation,
  char * piNewDeviceType,
  char * piNewComment,
  db2Uint32 iEID
} db2HistoryUpdateStruct;
/* ... */
 

Generic API Syntax



/* File: db2ApiDf.h */
/* API: Update Recovery History File */
/* ... */
SQL_API_RC SQL_API_FN
  db2GenHistoryUpdate (
    db2Uint32 version,
    void * pDB2GenHistoryUpdateStruct,
    struct sqlca * pSqlca);
 
typedef struct
{
  char * piNewLocation,
  char * piNewDeviceType,
  char * piNewComment,
  db2Uint32 iEID
} db2GenHistoryUpdateStruct;
/* ... */
 

API Parameters

version
Input. Specifies the version and release level of the structure passed in as the second parameter, pDB2HistoryUpdateStruct.

pDB2HistoryUpdateStruct
Input. A pointer to the db2HistoryUpdateStruct structure.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

piNewLocation
Input. A pointer to a string specifying a new location for the backup, restore, or load copy image. Setting this parameter to NULL, or pointing to zero, leaves the value unchanged.

piNewDeviceType
Input. A pointer to a string specifying a new device type for storing the backup, restore, or load copy image. Setting this parameter to NULL, or pointing to zero, leaves the value unchanged.

piNewComment
Input. A pointer to a string specifying a new comment to describe the entry. Setting this parameter to NULL, or pointing to zero, leaves the comment unchanged.

iEID
Input. A unique identifier that can be used to update a specific entry in the history file.

REXX API Syntax



UPDATE RECOVERY HISTORY USING :value 

REXX API Parameters

value
A compound REXX host variable containing information pertaining to the new location of a recovery history file entry. In the following, XXX represents the host variable name:

XXX.0
Number of elements in the variable (must be between 1 and 4)

XXX.1
OBJECT_PART (time stamp with a sequence number from 001 to 999)

XXX.2
New location for the backup or copy image (this parameter is optional)

XXX.3
New device used to store the backup or copy image (this parameter is optional)

XXX.4
New comment (this parameter is optional).

Usage Notes

This is an update function, and all information prior to the change is replaced and cannot be recreated. These changes are not logged.

The history file is used for recording purposes only. It is not used directly by the restore or the roll-forward functions. During a restore operation, the location of the backup image can be specified, and the history file is useful for tracking this location. The information can subsequently be provided to sqlubkp - Backup Database. Similarly, if the location of a load copy image is moved, the rollforward utility must be provided with the new location and type of storage media. For additional information, see the Administration Guide and sqluroll - Rollforward Database.

See Also

db2HistoryCloseScan - Close Recovery History File Scan

db2HistoryGetEntry - Get Next Recovery History File Entry

db2HistoryOpenScan - Open Recovery History File Scan

db2Prune - Prune Recovery History File.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]