COMPR_DB2INFO data structure
Describes the Db2® environment.
Db2
allocates and defines this structure and passes it in as a parameter to the
InitCompression and InitDecompression APIs. This structure
describes the database being backed up or restored and gives details about the Db2 environment where the
operation is occurring. The dbalias, instance,
node, catnode, and timestamp
parameters are used to name the backup image.
API and data structure syntax
struct COMPR_DB2INFO {
char tag[16];
db2Uint32 version;
db2Uint32 size;
char dbalias[SQLU_ALIAS_SZ+1];
char instance[SQL_INSTNAME_SZ+1];
SQL_PDB_NODE_TYPE node;
SQL_PDB_NODE_TYPE catnode;
char timestamp[SQLU_TIME_STAMP_LEN+1];
db2Uint32 bufferSize;
db2Uint32 options;
db2Uint32 bkOptions;
db2Uint32 db2Version;
db2Uint32 platform;
db2int32 comprOptionsByteOrder;
db2Uint32 comprOptionsSize;
void *comprOptions;
db2Uint32 savedBlockSize;
void *savedBlock;
};
COMPR_DB2INFO data structure parameters
- tag
- Used as an eye catcher for the structure. This is always set to
the string
"COMPR_DB2INFO \0"
. - version
- Indicates which version of the structure is being used so APIs can indicate the presence of additional fields. Currently, the version is 1. In the future there may be more parameters added to this structure.
- size
- Specifies the size of the COMPR_DB2INFO structure in bytes.
- dbalias
- Database alias. For restore operations, dbalias refers to the alias of the source database.
- instance
- Instance name.
- node
- Node number.
- catnode
- Catalog node number.
- timestamp
- The timestamp of the image being backed up or restored.
- bufferSize
- Specifies the size of a transfer buffer (in 4K pages).
- options
- The iOptions parameter specified in the db2Backup API or the db2Restore API.
- bkOptions
- For restore operations, specifies the iOptions parameter that was used in the db2Backup API when the backup was created. For backup operations, it is set to zero.
- db2Version
- Specifies the version of the Db2 engine.
- platform
- Specifies the platform on which the Db2 engine is running. The value will be one of the ones listed in sqlmon.h (located in the include directory).
- comprOptionsByteOrder
- Specifies the byte-order used on the client where the API is being run. Db2 will do no interpretation or conversion of the data passed through as comprOptions, so this field should be used to determine whether the data needs to be byte reversed before being used. Any conversion must be done by the plug-in library itself.
- comprOptionsSize
- Specifies the value of the piComprOptionsSize parameter in the db2Backup and db2Restore APIs.
- comprOptions
- Specifies the value of the piComprOptions parameter in the db2Backup and db2Restore APIs.
- savedBlockSize
- Size in bytes of savedBlock.
- savedBlock
- Db2 allows the plug-in library to save an arbitrary block of data in the backup image. If such a block of data was saved with a particular backup, it will be returned in these fields on the restore operation. For backup operations, these fields are set to zero.