DB2 10.5 for Linux, UNIX, and Windows

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 located 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 located 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 authority on Linux and UNIX operating systems or Local Administrator on Windows operating systems.

Command syntax

For Linux and UNIX operating systems
Read syntax diagramSkip visual syntax diagram
>>-db2iupgrade--+-----+--+-----+-------------------------------->
                '- -d-'  '- -k-'   

>--+------------------------------------------------------+----->
   '- -j--"TEXT_SEARCH-+--------------+-+-------------+-"-'   
                       '-,servicename-' '-,portnumber-'       

>--+---------------+--+---------------+--InstName--------------><
   '- -a--AuthType-'  '- -u--FencedID-'             

For Windows operating systems
Read syntax diagramSkip visual syntax diagram
>>-db2iupgrade--InstName--/u:--username,password---------------->

>--+----------------------------+--+----+--+---------------+---->
   '-/p:--instance-profile-path-'  '-/q-'  '-/a:--authType-'   

>--+-----------------------------------------------------+------>
   '-/j--"TEXT_SEARCH-+--------------+-+-------------+-"-'   
                      '-,servicename-' '-,portnumber-'       

>--+----+------------------------------------------------------><
   '-/?-'   

Command parameters

For Linux and UNIX operating systems
-d
Turns debug mode on. 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.
-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 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 will run. This option is required when upgrading a DB2 client instance to a DB2 server instance.
InstName
Specifies the name of the instance.
For 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 upgrading a partitioned instance.
/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 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

DB2 Enterprise Server Edition instances (instance type ese) and DB2 Advanced Enterprise Server Edition can be upgraded using the db2iupgrade command.

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 created for db2iupgrade is /tmp/db2ckupgrade.log.processID. Verify that 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 will 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 will check all partitions and will 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 Linux and UNIX operating systems
  • If you use the db2iupgrade command to upgrade a DB2 instance from a previous version to the current version of a DB2 database system, the DB2 Global Profile Variables defined in an old DB2 database installation path will not be upgraded over to the new installation location. The DB2 Instance Profile Variables specific to the instance to be upgraded will be carried over after the instance is upgraded.
  • If you are using the su command instead of the login command to become the root user, you must issue the su command with the - option to indicate that the process environment is to be set as if you had logged in to the system using the login command.
  • You must not source the DB2 instance environment for the root user. Running the db2iupgrade command when you sourced the DB2 instance environment is not supported.
  • On AIX® 6.1 (or higher), when running this command from a shared DB2 copy in a system workload partition (WPAR) global environment, this command must be run as the root user. WPAR is not supported in a DB2 pureScale® environment.

  • To upgrade a DB2 instance in AIX EFS databases, the following steps must be completed:
    1. Ensure the db2ckupgrade command runs clean against the databases.
    2. Ensure that the databases are offline.
    3. Uncatalog the databases.
    4. Run the db2stop command.
    5. As root, run the db2iupgrade command, and make sure that it is completed successfully.
    6. Recatalog the databases.
    7. Upgrade the databases that are cataloged by running the db2 upgrade command.