DB2_info data structure

Contains information about the Db2® product and the database that is being backed up or restored. This structure is used to identify Db2 to the vendor device and to describe a particular session between Db2 and the vendor device. It is passed to the backup and restore vendor storage plug-in as part of the Init_input data structure.
Table 1. Fields in the DB2_info Structure.
Field Name Data Type Description
DB2_id char An identifier for the Db2 product. Maximum length of the string it points to is 8 characters.
version char The current version of the Db2 product. Maximum length of the string it points to is 8 characters.
release char The current release of the Db2 product. Set to NULL if it is insignificant. Maximum length of the string it points to is 8 characters.
level char The current level of the Db2 product. Set to NULL if it is insignificant. Maximum length of the string it points to is 8 characters.
action char Specifies the action to be taken. Maximum length of the string it points to is 1 character.
filename char The file name used to identify the backup image. If it is NULL, the server_id, db2instance, dbname, and timestamp will uniquely identify the backup image. Maximum length of the string it points to is 255 characters.
server_id char A unique name identifying the server where the database resides. Maximum length of the string it points to is 8 characters.
db2instance char The db2instance ID. This is the user ID invoking the command. Maximum length of the string it points to is 8 characters.
type char Specifies the type of backup being taken or the type of restore being performed. The following are possible values: When action is SQLUV_WRITE: 0 - full database backup 3 - table space level backup. When action is SQLUV_READ: 0 - full restore 3 - online table space restore 4 - table space restore 5 - history file restore
dbname char The name of the database to be backed up or restored. Maximum length of the string it points to is 8 characters.
alias char The alias of the database to be backed up or restored. Maximum length of the string it points to is 8 characters.
timestamp char The time stamp used to identify the backup image. Maximum length of the string it points to is 26 characters.
sequence char Specifies the file extension for the backup image. For write operations, the value for the first session is 1 and each time another session is initiated with an sqluvint call, the value is incremented by 1. For read operations, the value is always zero. Maximum length of the string it points to is 3 characters.
obj_list struct sqlu_gen_list Reserved for future use.
max_bytes_per_txn sqlint32 Specifies to the vendor in bytes, the transfer buffer size specified by the user.
image_filename char Reserved for future use.
reserve void Reserved for future use.
nodename char Name of the node at which the backup was generated.
password char Password for the node at which the backup was generated.
owner char ID of the backup originator.
mcNameP char Management class.
dbPartition db2NoteType DB partition number. Numbers in the range {0 - 999} are supported by the vendor interface.
Note: All char data type fields are null-terminated strings.
Note: Some of these fields may use wild card characters for name matching, where '*' matches any sequence of characters and '?' matches any single character.

The filename, or server_id, db2instance, type, dbname and timestamp uniquely identifies the backup image. The sequence number, specified by sequence, identifies the file extension. When a backup image is to be restored, the same values must be specified to retrieve the backup image. Depending on the vendor product, if filename is used, the other parameters may be set to NULL, and vice versa.

API and data structure syntax

typedef struct DB2_info
{
  char *DB2_id;
  char *version;
  char *release;
  char *level;
  char *action;
  char *filename;
  char *server_id;
  char *db2instance;
  char *type;
  char *dbname;
  char *alias;
  char *timestamp;
  char *sequence;
  struct sqlu_gen_list *obj_list;
  sqlint32 max_bytes_per_txn;
  char *image_filename;
  void *reserve;
  char *nodename;
  char *password;
  char *owner;
  char *mcNameP;
  db2NodeType dbPartition;
} DB2_info ;