IBM Books

Administrative API Reference

db2HistoryGetEntry - Get Next Recovery History File Entry

Gets the next entry from the recovery history file. This API must be preceded by a successful call to db2HistoryOpenScan - Open Recovery History File Scan.

Authorization

None

Required Connection

Instance. It is not necessary to call sqleatin before calling this API.

Version

db2ApiDf.h

C API Syntax



/* File: db2ApiDf.h */
/* API: Get Next Recovery History File Entry */
/* ... */
SQL_API_RC SQL_API_FN
  db2HistoryGetEntry (
    db2Uint32 version,
    void * pDB2HistoryGetEntryStruct,
    struct sqlca * pSqlca);
 
typedef struct
{
  db2Uint16 iHandle,
  db2Uint16 iCallerAction,
  struct db2HistData * pioHistData
} db2HistoryGetEntryStruct;
/* ... */
 

Generic API Syntax



/* File: db2ApiDf.h */
/* API: Get Next Recovery History File Entry */
/* ... */
SQL_API_RC SQL_API_FN
  db2GenHistoryGetEntry (
    db2Uint32 version,
    void * pDB2GenHistoryGetEntryStruct,
    struct sqlca * pSqlca);
 
typedef struct
{
  db2Uint16 iHandle,
  db2Uint16 iCallerAction,
  struct db2HistData * pioHistData
} db2GenHistoryGetEntryStruct;
/* ... */
 

API Parameters

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

pDB2HistoryGetEntryStruct
Input. A pointer to the db2HistoryGetEntryStruct structure.

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

iHandle
Input. Contains the handle for scan access that was returned by db2HistoryOpenScan - Open Recovery History File Scan.

iCallerAction
Input. Specifies the type of action to be taken. Valid values (defined in db2ApiDf) are:

DB2HISTORY_GET_ENTRY
Get the next entry, but without any command data.

DB2HISTORY_GET_DDL
Get only the command data from the previous fetch.

DB2HISTORY_GET_ALL
Get the next entry, including all data.

pioHistData
Input. A pointer to the db2HistData structure. For more information about this structure, see db2HistData.

REXX API Syntax



GET RECOVERY HISTORY FILE ENTRY :scanid [USING :value] 

REXX API Parameters

scanid
Host variable containing the scan identifier returned from OPEN RECOVERY HISTORY FILE SCAN.

value
A compound REXX host variable into which the recovery history file entry information is returned. In the following, XXX represents the host variable name:

XXX.0
Number of first level elements in the variable (always 15)

XXX.1
Number of table space elements

XXX.2
Number of used table space elements

XXX.3
OPERATION (type of operation performed)

XXX.4
OBJECT (granularity of the operation)

XXX.5
OBJECT_PART (time stamp and sequence number)

XXX.6
OPTYPE (qualifier of the operation)

XXX.7
DEVICE_TYPE (type of device used)

XXX.8
FIRST_LOG (earliest log ID)

XXX.9
LAST_LOG (current log ID)

XXX.10
BACKUP_ID (identifier for the backup)

XXX.11
SCHEMA (qualifier for the table name)

XXX.12
TABLE_NAME (name of the loaded table)

XXX.13.0
NUM_OF_TABLESPACES (number of table spaces involved in backup or restore)

XXX.13.1
Name of the first table space backed up/restored

XXX.13.2
Name of the second table space backed up/restored

XXX.13.3
and so on

XXX.14
LOCATION (where backup or copy is stored)

XXX.15
COMMENT (text to describe the entry).

Usage Notes

The records that are returned will have been selected using the values specified on the call to db2HistoryOpenScan - Open Recovery History File Scan.

For a detailed description of the use of the recovery history file APIs, see db2HistoryOpenScan - Open Recovery History File Scan.

See Also

db2HistoryCloseScan - Close Recovery History File Scan

db2HistoryOpenScan - Open Recovery History File Scan

db2Prune - Prune Recovery History File

db2HistoryUpdate - Update Recovery History File.


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

[ DB2 List of Books | Search the DB2 Books ]