db2se upgrade command

The db2se upgrade command upgrades a spatially enabled Db2® database of version 9.7 or later to version 11.5.

This command might drop and re-create spatial indexes to complete the database upgrade, which can take a significant amount of time depending on the sizes of your tables. For example, your indexes will be dropped and re-created if your data is moving from a 32-bit instance to a 64-bit instance.
Tip: Run the db2se upgrade command with the option -force 0 and specify a messages file to find out which indexes must be upgraded without performing additional upgrade processing.

Authorization

DBADM and DATAACCESS authority on the spatially enabled database that you want to upgrade.

Command syntax

db2se upgrade command

Read syntax diagramSkip visual syntax diagramdb2se upgradedatabase_name -userIduser_id -pwpassword  -tableCreationParameterstable_creation_parameters  -force force_value  -messagesFilemessages_filename

Command parameters

Where:
database_name
The name of the database to be upgraded.
-userId user_id
The database user ID that has DATAACCESS authority on the database that is being upgraded.
-pw password
Your user password.
-tableCreationParameters table_creation_parameters
The parameters to be used in the creation of the Spatial Extender catalog tables.
-force force_value
  • 0: Default value. Attempt to upgrade the database, but it stops if any user-defined objects such as views, functions, triggers, or spatial indexes reference Spatial Extender objects.
  • 1: Automatically saves and restores application-defined objects. Saves and restores spatial indexes if necessary.
  • 2: Automatically saves and restores application-defined objects. Saves spatial index information, but does not automatically restore spatial indexes.
-messagesFile messages_filename
The file name containing the report of the upgrade actions. The file name you provide must be a fully-qualified file name on the server.
Tip: Specify this parameter to help you troubleshoot upgrade problems.
Restriction: You cannot specify an existing file.

Usage notes

The db2se upgrade command verifies several conditions and returns one or more of the following errors if any of these conditions are not true:
  • Database is not currently spatially enabled.
  • Database name is not valid.
  • Other connections to the database exist. Cannot proceed with the upgrade.
  • Spatial catalog is not consistent.
  • User is not authorized.
  • Password is not valid.
  • Some user-defined objects could not be upgraded.

Ensure that you have a system temporary table space with a page size of 8 KB or larger and with a minimum size of 500 pages. This is a requirement to run the db2se upgrade command successfully.