db2iupgrade - Upgrade instance command
Upgrades an instance to a Db2® copy of the current release from a Db2 copy of a previous release. The Db2 copy from where you are running the db2iupgrade command must support instance upgrade from the Db2 copy that you want to upgrade.
On Linux® and UNIX operating systems, this command is in the DB2DIR/instance directory, where DB2DIR represents the installation location where the new release of the Db2 database system is installed. This command does not support instance upgrade for a non-root installation.
On Windows operating systems, this command is in the DB2PATH\bin directory, where DB2PATH is the location where the Db2 copy is installed. To move your instance profile from its current location to another location, use the /p option and specify the instance profile path. Otherwise, the instance profile will stay in its original location after the upgrade.
Authorization
Root user or non-root user authority on Linux and UNIX operating systems. Local Administrator authority is required on Windows operating systems.
Command syntax
- For root installation on Linux and UNIX operating systems
- For an active instance upgrade on Linux operating systems
- For a non-root thin server instance on Linux and AIX® operating systems
- For root installation on Windows operating systems
Command parameters
- For root installation on Linux and UNIX operating systems
- -d
- Turns on debug mode. Use this option only when instructed by Db2 database support.
- -k
- Keeps the pre-upgrade instance type if it is supported in the Db2 copy from where you are running the db2iupgrade command. If this parameter is not specified, the instance type is upgraded to the default instance type supported.
- -g
- Upgrades all the members and cluster caching facilities (CFs) that are part of the Db2 pureScale® cluster at the same time. This parameter is the default parameter and is used only for Db2 pureScale instance types.
- -j "TEXT_SEARCH"
- Configures the Db2 Text Search server
using generated default values for service name and TCP/IP port number.
This parameter cannot be used if the instance type is client.
- -j "TEXT_SEARCH,servicename"
Configures the Db2 Text Search server using the provided service name and an automatically generated port number. If the service name has a port number that is assigned in the services file, it uses the assigned port number.
- -j "TEXT_SEARCH,servicename,portnumber"
Configures the Db2 Text Search server using the provided service name and port number.
- -j "TEXT_SEARCH,portnumber"
Configures the Db2 Text Search server using a default service name and the provided port number. Valid port numbers must be within the 1024 - 65535 range.
- -a AuthType
- Specifies the authentication type (SERVER, CLIENT, or SERVER_ENCRYPT) for the instance. The default is SERVER.
- -u FencedID
- Specifies the name of the user ID under which fenced user-defined functions and fenced stored procedures run. This option is required when a Db2 client instance is upgraded to a Db2 server instance.
- InstName
- Specifies the name of the instance.
- For an active instance upgrade on Linux operating systems
- -prepare
- Prepares the instance for upgrade to a new version while the old version is still running or active. This parameter is used to minimize the time for which an instance must be stopped for performing the upgrade operation. This parameter can be used for Db2 Server edition with ese instance type only.
- -commit
- Commits the instance upgrade to the current version of Db2 database server. This parameter is used only after stopping the instance that was prepared for upgrade using the -prepare option. This parameter can be used for Db2 Server edition with ese instance type only.
- For a non-root thin server instance on Linux and AIX operating systems
- -d
- Turns on debug mode. Use this option only when instructed by Db2 database support.
- -h | -?
- Displays the usage information.
- For root installation on Windows operating systems
- InstName
- Specifies the name of the instance.
- /u:username,password
- Specifies the account name and password for the Db2 service. This option is required when a partitioned instance is upgraded.
- /p:instance-profile-path
- Specifies the new instance profile path for the upgraded instance.
- /q
- Issues the db2iupgrade command in quiet mode.
- /a:authType
- Specifies the authentication type (SERVER, CLIENT, or SERVER_ENCRYPT) for the instance.
- /j "TEXT_SEARCH"
- Configures the Db2 Text Search server
using generated default values for service name and TCP/IP port number.
This parameter cannot be used if the instance type is client.
- /j "TEXT_SEARCH, servicename"
Configures the Db2 Text Search server using the provided service name and an automatically generated port number. If the service name has a port number that is assigned in the services file, it uses the assigned port number.
- /j "TEXT_SEARCH, servicename, portnumber"
Configures the Db2 Text Search server using the provided service name and port number.
- /j "TEXT_SEARCH, portnumber"
Configures the Db2 Text Search server using a default service name and the provided port number. Valid port numbers must be within the 1024 - 65535 range.
- /?
- Displays usage information for the db2iupgrade command.
Usage notes
Only Db2 Enterprise Server Edition instances (instance type ese) and Db2 Advanced Enterprise Server Edition can be upgraded using the db2iupgrade command.
If the pre-upgrade instance type is not dsf, the instance type is upgraded to ese instance type from other types. To keep the pre-upgrade type, the -k parameter must be used. If the pre-upgrade instance type is dsf , which is the Db2 pureScale instance type, this instance type is retained in the target release.
The db2iupgrade command calls the db2ckupgrade command with the -not1 parameter, and specifies upgrade.log as the log file for db2ckupgrade. The default log file that is created for db2iupgrade is /tmp/db2ckupgrade.log.processID. Verify that the instance and local databases are ready for upgrade before upgrading the instance. The -not1 parameter disables the check for type-1 indexes. The log file is created in the instance home directory for Linux and UNIX operating systems or in the current directory for Windows operating systems. The instance upgrade does not continue if the db2ckupgrade command returns any errors.
For partitioned database environments, run the db2ckupgrade command before you issue the db2iupgrade command. The db2ckupgrade command checks all partitions and returns errors found in any partition. If you do not check whether all database partitions are ready for upgrade, subsequent database upgrades could fail even though the instance upgrade was successful. See db2ckupgrade for details.
For HADR databases upgrading from Db2 Version 10.5 Fix Pack 7 or later the db2iupgrade command calls the db2ckupgrade command for validating the log positions of the primary database and all standby databases that are cataloged in the instances. To ensure the success of the UPGRADE DATABASE command in the new release, it is highly recommended to ensure that the db2ckupgrade command is run so that this log validation is done. Otherwise the UPGRADE DATABASE command might fail, which results in reinitialization of HADR.
- For Linux and UNIX operating systems