DB2 Server for VM: System Administration


Moving a Database

To move a database to another database manager:

  1. Start the source application server.

    If you normally use the database manager archiving facility, specify the LOGMODE=A initialization parameter to archive the database, or LOGMODE=L to archive the log. If you do not use the archiving facility, specify LOGMODE=Y.

  2. Set the password for authorization ID SQLDBA in the source application server to SQLDBAPW.
  3. Create a database archive tape file by issuing the SQLEND ARCHIVE DVERIFY operator command. If LOGMODE is set to L, the database manager also takes a log archive. You cannot use a database archive created by user facilities when moving your database.

    Do not destroy the source database until you are certain that it has been correctly moved to the target.

  4. Install the database manager that you are going to use as the target (if you have not already done so).

    Before proceeding to move the database, it is recommended that you first install and verify the IBM-supplied starter database on the target database manager, to ensure that the target database manager has been correctly installed. For information on how to do this, see the DB2 Server for VM Program Directory.

  5. Define and generate a database on the target system. The new database directory and dbextents must be defined with sufficient space to contain the old directory and dbextents.

    If you are moving from a VSE to a VM operating system, you must increase the space allocations used by approximately 16% for count-key-data DASDs that are 10 cylinders or fewer, and for FBA devices that are 5000 blocks or fewer. For data sets larger than 10 cylinders or larger than 5000 FBA blocks, increase the allocation by about 3%. These increases account for VM DASD block I/O. If you use allocations on VM that are the same size as those you used on VSE, the VM database will be too small.

    You must define exactly the same number of dbextents and logs that existed on the old database.

    For database planning information, see Chapter 2, Planning for Database Generation. For the database definition and generation procedure, see the DB2 Server for VM Program Directory DB2 Server for VSE Program Directory.

  6. Perform coldlog processing against the target database manager, by entering the command:
          SQLLOG DBNAME(server-name)
    

    Respond CONTINUE to message ARI0688D (for single logging) or ARI6129D (for dual logging). Respond 0 to message ARI0944D to reformat the log.

  7. Restore the database archive tape file created in step 3 above to the target database, by entering the command:

          SQLSTART DBNAME(server-name) PARM(STARTUP=R)
    

    Do not specify LOGMODE=A or L when you issue SQLSTART. Message ARI0253D is displayed, indicating that the restored database archive is not known to the database manager. (The database manager keeps track of archives in the log history area.) Reply IGNORE to this message. When the application server is started and ready for operator commands, shut it down by issuing the SQLEND command.

  8. Install the correct version of the HELP text into the target database.

    This text is different on the VSE and VM operating systems, so if you have moved from one system to the other and had the HELP text installed, replace it with the target system version.

    For information on how to install the HELP text, see the DB2 Server for VM Program Directory .


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