This structure is used to return information after a call to the db2HistoryGetEntry API.
Field name | Data type | Description |
---|---|---|
ioHistDataID | char(8) | An 8-byte structure identifier and "eye-catcher" for storage dumps. The only valid value is SQLUHINF. No symbolic definition for this string exists. |
oObjectPart | db2Char | The first 14 characters are a time stamp with format yyyymmddhhmmss, 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 yyyymmddhhmmss, indicating when the operation was completed. |
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 parameter
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 parameter:
|
oComment | db2Char | Free form text comment. |
oCommandText | db2Char | Command text, or DDL. |
oLastLSN | db2LSN | Last log sequence number. |
oEID | Structure | Unique entry identifier. |
poEventSQLCA | Structure | Result sqlca of the recorded event. |
poTablespace | db2Char | A list of table space names. |
iNumTablespaces | db2Uint32 | Number of entries in the poTablespace list that are available for use by the db2HistoryGetEntry API. |
oNumTablespaces | db2Uint32 | Number of entries in the poTablespace list that were used by the db2HistoryGetEntry API. 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. |
ioLogRange | db2HistoryLogRange | Log ranges for each log stream. |
oOperation | char | See Table 2. |
oObject | char | Granularity of the operation: D for full database, P for table space, and T for table. |
oOptype | char | See Table 3. |
oStatus | char | Entry status: A for active; I for inactive; E for expired; D for deleted; and X for do not delete. |
oDeviceType | char | Device type. This field determines how the oLocation field is interpreted: A for TSM, C for client, D for disk, F for snapshot backup, K for diskette, L for local, O for other (for other vendor device support), P for pipe, Q for cursor, S for server, T for tape, and U for user exit. |
Value | Description | C definition | COBOL/FORTRAN definition |
---|---|---|---|
A | add table space | DB2HISTORY_OP_ADD_TABLESPACE | DB2HIST_OP_ADD_TABLESPACE |
B | backup | DB2HISTORY_OP_BACKUP | DB2HIST_OP_BACKUP |
C | load copy | DB2HISTORY_OP_LOAD_COPY | DB2HIST_OP_LOAD_COPY |
D | dropped table | DB2HISTORY_OP_DROPPED_TABLE | DB2HIST_OP_DROPPED_TABLE |
F | rollforward | DB2HISTORY_OP_ROLLFWD | DB2HIST_OP_ROLLFWD |
G | reorganize table | DB2HISTORY_OP_REORG | DB2HIST_OP_REORG |
L | load | DB2HISTORY_OP_LOAD | DB2HIST_OP_LOAD |
N | rename table space | DB2HISTORY_OP_REN_TABLESPACE | DB2HIST_OP_REN_TABLESPACE |
O | drop table space | DB2HISTORY_OP_DROP_TABLESPACE | DB2HIST_OP_DROP_TABLESPACE |
Q | quiesce | DB2HISTORY_OP_QUIESCE | DB2HIST_OP_QUIESCE |
R | restore | DB2HISTORY_OP_RESTORE | DB2HIST_OP_RESTORE |
T | alter table space | DB2HISTORY_OP_ALT_TABLESPACE | DB2HIST_OP_ALT_TBS |
U | unload | DB2HISTORY_OP_UNLOAD | DB2HIST_OP_UNLOAD |
oOperation | oOptype | Description | C/COBOL/FORTRAN definition |
---|---|---|---|
B | F N I O D E | offline, online, incremental offline, incremental online, delta offline, delta online | DB2HISTORY_OPTYPE_OFFLINE, DB2HISTORY_OPTYPE_ONLINE, DB2HISTORY_OPTYPE_INCR_OFFLINE, DB2HISTORY_OPTYPE_INCR_ONLINE, DB2HISTORY_OPTYPE_DELTA_OFFLINE, DB2HISTORY_OPTYPE_DELTA_ONLINE |
F | E P | end of logs, point in time | DB2HISTORY_OPTYPE_EOL, DB2HISTORY_OPTYPE_PIT |
G | F N | offline, online | DB2HISTORY_OPTYPE_OFFLINE, DB2HISTORY_OPTYPE_ONLINE |
L | I R | insert, replace | DB2HISTORY_OPTYPE_INSERT, DB2HISTORY_OPTYPE_REPLACE |
Q | S U X Z | quiesce share, quiesce update, quiesce exclusive, quiesce reset | DB2HISTORY_OPTYPE_SHARE, DB2HISTORY_OPTYPE_UPDATE, DB2HISTORY_OPTYPE_EXCL, DB2HISTORY_OPTYPE_RESET |
R | F N I O | offline, online, incremental offline, incremental online | DB2HISTORY_OPTYPE_OFFLINE, DB2HISTORY_OPTYPE_ONLINE, DB2HISTORY_OPTYPE_INCR_OFFLINE, DB2HISTORY_OPTYPE_INCR_ONLINE |
T | C R | add containers, rebalance | DB2HISTORY_OPTYPE_ADD_CONT, DB2HISTORY_OPTYPE_REB |
Field name | Data type | Description |
---|---|---|
ioNode ioHID | SQL_PDB_NODE_TYPE db2Uint32 | Node number. Local database history records entry ID. |
This structure is used in the db2HistoryData structure
Field name | Data type | Description |
---|---|---|
iNumLogStreams | DB2UINT32 | Allocated number of log streams in oStream. |
oNumLogStreams | DB2UINT32 | Number of valid log streams being returned in oStream. |
oStream | db2HistoryLogStreamRange | List of log ranges (by log stream). |
This structure is used in the db2HistoryLogRange structure
Field name | Data type | Description |
---|---|---|
oStreamID | db2LogStreamIDType | Log stream ID of the log range |
oFirstLog | DB2UINT32 | The earliest log file extent.
|
oLastLog | DB2UINT32 | The latest log file extent.
|
typedef SQL_STRUCTURE db2HistoryData
{
char ioHistDataID[8];
db2Char oObjectPart;
db2Char oEndTime;
db2Char oID;
db2Char oTableQualifier;
db2Char oTableName;
db2Char oLocation;
db2Char oComment;
db2Char oCommandText;
db2LSN oLastLSN;
db2HistoryEID oEID;
struct sqlca *poEventSQLCA;
struct db2Char *poTablespace;
db2Uint32 iNumTablespaces;
db2Uint32 oNumTablespaces;
db2HistoryLogRange ioLogRange;
char oOperation;
char oObject;
char oOptype;
char oStatus;
char oDeviceType;
db2HistoryData;
}
typedef SQL_STRUCTURE db2HistoryLogRange
{
db2Uint32 iNumLogStreams;
db2Uint32 oNumLogStreams;
struct db2HistoryLogStreamRange *oStream;
db2HistoryLogRange;
}
typedef SQL_STRUCTURE db2HistoryLogStreamRange
{
db2LogStreamIDType oStreamID;
db2Uint32 oFirstLog;
db2Uint32 oLastLog;
db2HistoryLogStreamRange;
}
typedef SQL_STRUCTURE db2Char
{
char *pioData;
db2Uint32 iLength;
db2Uint32 oLength;
db2Char;
}
typedef SQL_STRUCTURE db2HistoryEID
{
SQL_PDB_NODE_TYPE ioNode;
db2Uint32 ioHID;
db2HistoryEID;
}