Nonstop Database, HiRDB Version 9 System Operation Guide
11.7.2 Migration procedure
(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:
- A different HiRDB directory must be used than the one for the HiRDB single server configuration.
- The system files for the HiRDB single server configuration must not be used; new system files must be created for the HiRDB parallel server configuration.
- The server machine used by the HiRDB single server configuration (existing server machine) must be defined as the dictionary server.
(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:
- Using HiRDB operation commands
- Using OS commands
(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
- Rules and notes on migration
- The HiRDB identifier cannot be changed (the value of pd_system_id in the system common definition cannot be changed).
- 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.
- 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.
- 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.
- 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:
- tar or cp command
- rcp command
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
- 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)
- 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.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.