IBM Books

Installation and Configuration Supplement


Migrating Instances

Before you can migrate an instance to use the latest version of DB2, you must install DB2 Version 6 on your system.

Figure hint not displayed.

If there are several DB2 instances using previous versions of DB2, you do not need to migrate all of these instances at this time. Instances that are not migrated will continue to use previous versions of DB2. 
Each DB2 instance must be migrated separately. To successfully migrate a DB2 instance, perform the following steps:
step  1.  Prepare the DB2 instance for migration. 
step  2.  Migrate the DB2 instance. 
If you want to migrate several instances, you must repeat these steps for each instance.

Step 1. Prepare the DB2 Instance for Migration

Before you can migrate a DB2 instance, all applications using any databases owned by this instance must be completed. To prepare a DB2 instance for migration, perform the following steps:
step  1.  Log in as the DB2 instance owner. 
step  2.  Stop all command line processor sessions by entering the db2 terminate command in each session that was running the command line processor. 
step  3.  Enter the db2_kill command to clean up any remaining DB2 resources. 
step  4.  Log off. 

The DB2 instance is now ready for migration.

Step 2. Migrate the DB2 Instance

After an instance is ready for migration, use the db2imigr command to migrate the instance as follows:
  1. Log in as user with root authority.
  2. Figure hint not displayed.

    If the library_path environment variable is set to /usr/lib on AIX or /opt/lib on HP-UX, or Solaris, and there is a link in /usr/lib or /opt/lib to the Version 6 libdb2 shared library, this can cause an error when using the db2imigr command. To fix the error, you should reset the library_path environment variable so that it does not reference the libraries in those paths by entering the following command: 
       unset library_path
    where library_path represents: 
    • LIBPATH on AIX 
    • SHLIB_PATH on HP-UX 
    • LD_LIBRARY_PATH on Solaris 
    After migrating the DB2 instance, you should reset LIBPATH to its original setting. 
  3. Run the db2imigr command as follows: 
  4. DB2DIR/instance/db2imigr [-d] [-a AuthType] [-u fencedID] InstName
     
    where DB2DIR  = /usr/lpp/db2_06_01  on AIX 
    = /opt/IBMdb2/V6.1  on HP-UX, Solaris, or SGI IRIX 
    and where:
    -d
    Sets the debug mode that you can use for problem determination. This parameter is optional.
    -a AuthType
    Specifies the authentication type for the instance. Valid authentication types are (SERVER), (CLIENT), and (DCS). If the -a parameter is not specified, the authentication type defaults to (SERVER), if a DB2 server is installed. Otherwise, the AuthType is set to (CLIENT). This parameter is optional.

    Notes:

    1. The authentication type of the instance applies to all databases owned by the instance.
    2. While authentication type (DCE) is an optional parameter, it is not valid to choose (DCE) for this command.
    -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 hint not displayed.

If you are migrating a DB2 Version 2.1 or Version 5 instance, created on AIX, and the instance uses the environment variable DB2SORT set to a keyword SMARTSORT, you must set the registry value db2sort after the instance is migrated to Version 6. Set the db2sort registry value to the run time library for the sort command as follows: 
   db2set DB2SORT="/usr/lib/libsort.a"

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ] 

[ DB2 List of Books | Search the DB2 Books