Converts
a DB2® Version 9.5, Version 9.7
or Version 9.8 database to the current release.
Required connection
This API establishes
a database connection.
API include file
db2ApiDf.h
API and data structure syntax
SQL_API_RC SQL_API_FN
db2DatabaseUpgrade (
db2Uint32 versionNumber,
void *pParmStruct,
struct sqlca *pSqlca);
typedef SQL_STRUCTURE db2DatabaseUpgradeStruct
{
char *piDbAlias;
char *piUserName;
char *piPassword;
db2Uint16 iDbAliasLen;
db2Uint16 iUserNameLen;
db2Uint16 iPasswordLen;
db2Uint32 upgradeFlags;
} db2DatabaseUpgradeStruct;
db2DatabaseUpgrade API parameters
- versionNumber
- Input. Specifies the version and release level of the pParmStruct structure
passed as the second parameter.
- pParmStruct
- Input. A pointer to the db2DatabaseUpgradeStruct structure.
- pSqlca
- Output. A pointer to the sqlca structure.
db2DatabaseUpgradeStruct data parameters
- piDbAlias
- Input. A string containing the alias of the database that is cataloged
in the system database directory.
- piUserName
- Input. A string containing the user name of the application. May
be NULL.
- piPassword
- Input. A string containing the password of the supplied user name
(if any). May be NULL.
- iDbAliasLen
- Input. A 2-byte unsigned integer representing the length in bytes
of the database alias.
- iPasswordLen
- Input. A 2-byte unsigned integer representing the length in bytes
of the password. Set to zero when no password is supplied.
- iUserNameLen
- Input. A 2-byte unsigned integer representing the length in bytes
of the user name. Set to zero when no user name is supplied.
- upgradeFlags
- Input. Database upgrade options. Valid values (defined in the db2ApiDf header
file which is located in the include directory)
are:
- DB2DBUPGRADE_REBINDALL
- Rebind invalid packages during database upgrade.
- 0
- Default value which won't rebind all packages during database
upgrade.
Usage notes
This API will only upgrade a
database to a higher version, and cannot be used to convert an upgraded
database to its previous version.
The database must be cataloged
before database upgrade.