db2DatabaseUpgrade API - Upgrade previous version of Db2 database to the current release

Upgrades a Db2 database to the current release from a supported release earlier than Db2 version 11.1.

Authorization

SYSADM

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;
        db2Uint16 iOptions;
} 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.
iOptions
Input. A bitmap indicating upgrade command options. The options are combined using the bitwise OR operator to produce a value for the parameter. Valid values (defined in db2ApiDf.h header file, located in the include directory) are:
DB2DBUPGRADE_REBINDALL
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.

Important: The support in COBOL and FORTRAN for the db2DatabaseUpgrade API is deprecated and might be removed in a future release. For more information, see Support in COBOL and FORTRAN for the db2DatabaseUpgrade API.