sqlemgdb API - Upgrade previous version of Db2 database to current version
Converts a previous (Version 8 or higher) version of a
Db2 database to
the current release.
The sqlemgdb and sqlgmgdb APIs
are deprecated and will be discontinued in a future release. You should use the new
db2DatabaseUpgrade API instead.
Authorization
SYSADM
Required connection
This API establishes a database connection.
API include file
sqlenv.h
API and data structure syntax
SQL_API_RC SQL_API_FN
sqlemgdb (
_SQLOLDCHAR * pDbAlias,
_SQLOLDCHAR * pUserName,
_SQLOLDCHAR * pPassword,
struct sqlca * pSqlca);
SQL_API_RC SQL_API_FN
sqlgmgdb (
unsigned short PasswordLen,
unsigned short UserNameLen,
unsigned short DbAliasLen,
struct sqlca * pSqlca,
_SQLOLDCHAR * pPassword,
_SQLOLDCHAR * pUserName,
_SQLOLDCHAR * pDbAlias);
sqlemgdb API parameters
- pDbAlias
- Input. A string containing the alias of the database that is cataloged in the system database directory.
- pUserName
- Input. A string containing the user name of the application. May be NULL.
- pPassword
- Input. A string containing the password of the supplied user name (if any). May be NULL.
- pSqlca
- Output. A pointer to the sqlca structure.
sqlgmgdb API-specific parameters
- PasswordLen
- Input. A 2-byte unsigned integer representing the length in bytes of the password. Set to zero when no password is supplied.
- UserNameLen
- Input. A 2-byte unsigned integer representing the length in bytes of the user name. Set to zero when no user name is supplied.
- DbAliasLen
- Input. A 2-byte unsigned integer representing the length in bytes of the database alias.
Usage notes
This API will only upgrade a database to a newer version, and cannot be used to convert an upgraded database to its previous version.
The database must be cataloged before migration.
REXX API syntax
MIGRATE DATABASE dbalias [USER username USING password]
REXX API parameters
- dbalias
- Alias of the database to be upgraded.
- username
- User name under which the database is to be restarted.
- password
- Password used to authenticate the user name.