Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

11.7.2 Migration procedure

Executor: HiRDB administrator and superuser

The following figure shows a model for migration from a HiRDB single server configuration to a HiRDB parallel server configuration.

Figure 11-2 Model for migration from a HiRDB single server configuration to a HiRDB parallel server configuration

[Figure]

The procedure for migrating from a HiRDB single server configuration to a HiRDB parallel server configuration is explained below.

Organization of this subsection
(1) Execute the database structure modification utility
(2) Terminate HiRDB normally
(3) Set up the HiRDB parallel server configuration environment
(4) Migrate the user RDAREAs, user LOB RDAREAs, and list RDAREAs to the other server machine
(5) Start HiRDB normally
(6) Re-create the stored procedures and stored functions

(1) Execute the database structure modification utility

The alter HiRDB mode to parallel statement of the database structure modification utility (pdmod command) is used to modify the RDAREAs for the HiRDB parallel server configuration. For examples of using this utility, see the manual HiRDB Version 9 Command Reference.

(2) Terminate HiRDB normally

The pdstop command is entered to terminate the HiRDB single server configuration normally (the termination must be a normal termination).

(3) Set up the HiRDB parallel server configuration environment

The HiRDB parallel server configuration environment is set up. For details on HiRDB parallel server configuration environment setup, see the HiRDB Version 9 Installation and Design Guide.

The following points should be noted about environment setup:

(4) Migrate the user RDAREAs, user LOB RDAREAs, and list RDAREAs to the other server machine

At this point, the user RDAREAs, user LOB RDAREAs, and list RDAREAs are still at the server machine used for the HiRDB single server configuration (existing server machine). There are two ways to migrate the user RDAREAs, user LOB RDAREAs, and list RDAREAs to the other server machine:

(a) Using HiRDB operation commands

RDAREAs can be migrated in units of HiRDB file system areas or in units of HiRDB files by using HiRDB operation commands.

The following figure shows the procedure for migrating RDAREAs to another server using HiRDB operation commands.

Figure 11-3 Procedure for migrating RDAREAs to another server using HiRDB operation commands

[Figure]

Rules and notes on migration
  1. The HiRDB identifier cannot be changed (the value of pd_system_id in the system common definition cannot be changed).
  2. The HiRDB file system areas must be created in the target server machine under the same names as were used in the source server machine.
  3. The lengths of the HiRDB file system areas in the target server machine must be set so as to be equal to or greater than the lengths of the HiRDB file system areas in the source server machine.
  4. When a HiRDB file is restored, the HiRDB file system area created in the target server machine must be large enough to store the file.
  5. The HiRDB file system areas in the source server machine should not be deleted immediately after migration has been completed. Startup and operation of the HiRDB parallel server configuration should be checked before the HiRDB file system areas are deleted from the source server machine.
(b) Using OS commands

The following OS commands can be used to migrate RDAREAs to another server machine:

RDAREAs can be migrated in units of HiRDB file system areas by using OS commands.

Using the tar or cp command
The following figure shows the procedure for migrating RDAREAs to another server machine using the tar or cp command.

Figure 11-4 Procedure for migrating RDAREAs to another server machine using the tar or cp command

[Figure]

Notes
  • The HiRDB file system areas must be created in the target server machine under the same names as were used in the source server machine.
  • If a file to be migrated is a character special file, the partition size in the target server machine must be set to be equal to or greater than the partition size in the source server machine.
  • The HiRDB file system areas in the source server machine should not be deleted immediately after migration has been completed. Startup and operation of the HiRDB parallel server configuration should be checked before the HiRDB file system areas are deleted from the source server machine.

Using the rcp command
The following figure shows the procedure for migrating RDAREAs to another server machine using the rcp command.

Figure 11-5 Procedure for migrating RDAREAs to another server machine (using the rcp command)

[Figure]

Notes
  • The HiRDB file system areas must be created in the target server machine under the same names as were used in the source server machine.
  • If a file to be migrated is a character special file, the partition size in the target server machine must be set to be equal to or greater than the partition size in the source server machine.
  • The HiRDB file system areas in the source server machine should not be deleted immediately after migration has been completed. Startup and operation of the HiRDB parallel server configuration should be checked before the HiRDB file system areas are deleted from the source server machine.

(5) Start HiRDB normally

The pdstart command is entered to start the HiRDB parallel server configuration normally.

(6) Re-create the stored procedures and stored functions

If stored procedures and stored functions (stored functions for user-defined functions) have been created, ALTER ROUTINE must be used to re-create them.

This step is necessary because when a HiRDB single server configuration is migrated to a HiRDB parallel server configuration, the existing stored procedures and stored functions are no longer valid.