Quick Beginnings

Migrating Instances

To migrate instances, including your Administration Server instance, to a format usable by DB2 Version 7, you must run the db2imigr command:

  1. Log in as user with root authority.
  2. Run the db2imigr command as follows:
    DB2DIR/instance/db2imigr [-d] [-u fencedID] InstName
    



    where DB2DIR = /usr/lpp/db2_07_01 on AIX


    = /opt/IBMdb2/V7.1 on HP-UX, PTX, or Solaris

    and where:

    -d
    Sets the debug mode that you can use for problem determination. This parameter is optional.

    -u fencedID
    Is the user under which the fenced user-defined functions (UDFs) and stored procedures will execute. This parameter is optional only when a DB2 Run-Time Client is installed. It is required for all other DB2 products.

    InstName
    Is the login name of the instance owner.


    Figure 00002674 not displayed.

    Because the INSTHOME directory is NFS mounted on all machines, you only have to run the db2imigr command on one machine to migrate the entire instance.

  3. If there are any errors in verifying that all databases can be migrated, see Possible Migration Error Messages and User Responses and take the suggested corrective actions. Then, reenter the db2imigr command.
Note:If you are migrating a DB2 for AIX instance and the it uses the environment variable DB2SORT set to the keyword SMARTSORT, you must set the registry value db2sort after the instance is migrated to Version 7. Set the db2sort registry value to the run time library for the sort command as follows:
   db2set DB2SORT="/usr/lib/libsort.a"

Possible Migration Error Messages and User Responses

If the db2imigr command fails, check the following list of error messages and take the appropriate action.

A database is in backup pending state

Perform a backup of the database.

A database is in roll-forward pending state

Recover the database as required. Perform or resume a roll-forward database to end of logs and stop.

Table space ID is not in normal state

Recover the database and table space as required. Perform or resume a roll-forward database to end of logs and stop.

A database is in an inconsistent state

Restart the database to return it to a consistent state.

Structured type and function have the same name

A structured type and function (with no arguments) belonging to the same schema cannot have the same name. The type or function, and objects using the type or function, must be dropped and recreated using another name. To correct this error:

  1. Back up the database.
  2. Export the data from any tables that are dependent on the structured types or functions.
  3. Drop any tables dependent on the structured types or functions, and then drop the structured types or functions. These drops may drop other objects such as views, indexes, triggers, or functions.
  4. Create structured types or functions with different type or function names and recreate the tables using the new structured type or function names. Recreate any dropped views, indexes, triggers, or functions.
  5. Import or load the data into the object.

The database contains user-defined distinct types (UDTs) that use the type name BIGINT, DATALINK, or REFERENCE.

These data type names are reserved for the Version 7 database manager. To correct this error:

  1. Back up the database.
  2. Export the data from any tables that are dependent on these data types.
  3. Drop any tables dependent on these data types, and then drop the data types. These drops may drop other objects such as views, indexes, triggers, or functions.
  4. Create data types with different type or function names and recreate the tables using the new data type names. Recreate any dropped views, indexes, triggers, or functions.
  5. Import or load the data into the object.


[ Top of Page | Previous Page | Next Page ]