Administrative API Reference

db2HistData

This structure is used to return information after a call to db2HistoryGetEntry - Get Next Recovery History File Entry.

Table 11. Fields in the db2HistData Structure
Field Name Data Type Description
ioHistDataID char(8) An eight-byte structure identifier and "eye-catcher" for storage dumps. The only valid value is "SQLUHINF". No symbolic definition for this strings exists.
oObjectPart db2Char The first 14 characters are a time stamp with format yyyymmddhhnnss, indicating when the operation was begun. The next 3 characters are a sequence number. Each backup operation can result in multiple entries in this file when the backup image is saved in multiple files or on multiple tapes. The sequence number allows multiple locations to be specified. Restore and load operations have only a single entry in this file, which corresponds to sequence number '001' of the corresponding backup. The time stamp, combined with the sequence number, must be unique.
oEndTime db2Char A time stamp with format yyyymmddhhnnss, indicating when the operation was completed.
oFirstLog db2Char The earliest log file ID (ranging from S0000000 to S9999999):
  • Required to apply roll forward recovery for an online backup
  • Required to apply roll forward recovery for an offline backup
  • Applied after restoring a full database or table space level backup that was current when the load started.
oLastLog db2Char The latest log file ID (ranging from S0000000 to S9999999):
  • Required to apply roll forward recovery for an online backup
  • Required to apply roll forward recovery to the current point in time for an offline backup
  • Applied after restoring a full database or table space level backup that was current when the load operation finished (will be the same as oFirstLog if roll forward recovery is not applied).
oID db2Char Unique backup or table identifier.
oTableQualifier db2Char Table qualifier.
oTableName db2Char Table name.
oLocation db2Char For backups and load copies, this field indicates where the data has been saved. For operations that require multiple entries in the file, the sequence number defined by oObjectPart identifies which part of the backup is found in the specified location. For restore and load operations, the location always identifies where the first part of the data restored or loaded (corresponding to sequence '001' for multi-part backups) has been saved. The data in oLocation is interpreted differently, depending on oDeviceType:
  • For disk or diskette (D or K), a fully qualified file name
  • For tape (T), a volume label
  • For TSM (A), the server name
  • For user exit or other (U or O), free form text.
oComment db2Char Free form text comment.
oCommandText db2Char Command text, or DDL.
oLastLSN SQLU_LSN Last log sequence number.
oEID Structure Unique entry identifier.
poEventSQLCA Structure Result sqlca of the recorded event. For information about the sqlca structure, see SQLCA.
poTablespace db2Char A list of table space names.
ioNumTablespaces db2Uint32 Number of entries in the poTablespace list. Each table space backup contains one or more table spaces. Each table space restore operation replaces one or more table spaces. If this field is not zero (indicating a table space level backup or restore), the next lines in this file contain the name of the table space backed up or restored, represented by an 18-character string. One table space name appears on each line.
oOperation char Type of event: B for backup, C for copy, D for dropped table, F for roll forward, G for reorganize table, L for load, Q for quiesce, R for restore, S for run statistics, T for alter table space, and U for future use.
oObject char Granularity of the operation: D for full database, P for table space, and T for table.
oOptype char Operation type: C for alter tablespace (add containers), E for end of log, F for offline, I for insert (load), N for online, P for point in time, R for alter tablespace (rebalance), S for quiesce share, U for quiesce update, X for quiesce exclusive, and Z for quiesce reset.
oStatus char Entry status: D for deleted (future use), E for expired, I for inactive, N for not yet committed, and Y for committed or active.
oDeviceType char Device type. This field determines how the oLocation field is interpreted: A for TSM, C for client, D for disk, K for diskette, L for local, O for other (for other vendor device support), P for pipe, S for server, T for tape, and U for user exit.


Table 12. Fields in the db2Char Structure
Field Name Data Type Description
pioData char A pointer to a character data buffer. If NULL, no data will be returned.
iLength db2Uint32 Input. The size of the pioData buffer.
oLength db2Uint32 Output. The number of valid characters of data in the pioData buffer.


Table 13. Fields in the db2HistoryEID Structure
Field Name Data Type Description
ioNode SQL_PDB_NODE_TYPE Node number.
ioHID db2Uint32 Local history file entry ID.

Language Syntax

C Structure



/* File: db2ApiDf.h */
/* ... */
typedef SQL_STRUCTURE db2HistoryData
{
  char ioHistDataID[8];
  db2Char oObjectPart;
  db2Char oEndTime;
  db2Char oFirstLog;
  db2Char oLastLog;
  db2Char oID;
  db2Char oTableQualifier;
  db2Char oTableName;
  db2Char oLocation;
  db2Char oComment;
  db2Char oCommandText;
  SQLU_LSN oLastLSN;
  db2HistoryEID oEID;
  struct sqlca * poEventSQLCA;
  db2Char * poTablespace;
  db2Uint32 ioNumTablespaces;
  char oOperation;
  char oObject;
  char oOptype;
  char oStatus;
  char oDeviceType
} db2HistoryData;
 
typedef SQL_STRUCTURE db2Char
{
  char * pioData;
  db2Uint32 ioLength
} db2Char;
 
typedef SQL_STRUCTURE db2HistoryEID
{
  SQL_PDB_NODE_TYPE ioNode;
  db2Uint32 ioHID
} db2HistoryEID;
/* ... */
 


[ Top of Page | Previous Page | Next Page ]