Nonstop Database, HiRDB Version 9 System Operation Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
15.9.5 Example 4 (Moving RDAREAs containing a row-partitioned table)
(1) Add unit 2
(2) Use the pdcopy command to back up the RDAREAs
pdcopy -m /rdarea/mast/mast01 -M r -a -b /pdcopy/backup01 -p /pdcopy/list01
|
- Explanation
- -m: Specifies the name of the first HiRDB file in the master directory RDAREA.
- -M: Specifies the backup acquisition mode.
- -a: Specifies that all RDAREAs are to be backed up. Because the master directory RDAREA and the data dictionary RDAREAs are updated when an RDAREA is moved, we recommend that you back up all RDAREAs at this time.
- -b: Specifies the name of the backup file.
- -p: Specifies the output destination of the pdcopy command's processing results listing.
- For details about making backups, see 6. Backup Procedures.
(3) Use DROP INDEX to delete the non-partitioning key index
Because you cannot move an RDAREA that contains a non-partitioning key index, use DROP INDEX to delete INDEX2 (the non-partitioning key index).
(4) Use the pdhold command to place the RDAREAs being moved in shutdown and closed status
pdhold -r RDAREA2,RDAREA4,RDAREA6 -c
|
(5) Create a control statements file for the pdmod command
Create a control statements file (/pdmod/move01) containing a move rdarea statement for the pdmod command. The following shows the contents of this control statements file:
move rdarea RDAREA2,RDAREA4,RDAREA6 1
to bes2; 2
|
- Explanation
- Specifies the names of the RDAREAs being moved.
- Specifies the name of the target server.
(6) Use the pdmod command to move the RDAREAs
- Explanation
- -a: Specifies the name of the control statements file for the pdmod command.
(7) Use the pdstop command to terminate HiRDB normally
(8) Transfer the HiRDB files comprising the RDAREAs being moved
Use one of the methods explained below to transfer the HiRDB files of the RDAREAs being moved to the new server machine.
(a) Transfer by HiRDB file system area
This method requires that the following be satisfied:
- The HiRDB file system area is a regular file.
- The HiRDB file system area contains only the HiRDB file being moved.
Use the operating system's rcp or ftp command to transfer the HiRDB file system areas.
rcp /area2 host2:/area2
rcp /area4 host2:/area4
rcp /area6 host2:/area6
|
- Explanation
- Transfers the HiRDB file system areas for RDAREA2, RDAREA4, and RDAREA6.
(b) Transfer by HiRDB file
If you cannot use the method described in (a), use the procedure described below to move the HiRDB files.
Operations on the source machine
- Use the pdfbkup command to back up the HiRDB files to be moved.
- Use the rcp or ftp command to move the backups you made of the HiRDB files.
- Use the pdfrm command to delete the originals of the HiRDB files that you moved.
- Example
pdfbkup /area2/rdarea2 /tmp/bk_rdarea2 1
pdfbkup /area4/rdarea4 /tmp/bk_rdarea4 1
pdfbkup /area6/rdarea6 /tmp/bk_rdarea6 1
rcp /tmp/"bk_*" host2:/tmp/ 2
pdfrm /area2/rdarea2 3
pdfrm /area4/rdarea4 3
pdfrm /area6/rdarea6 3
|
- Explanation
- Backs up the HiRDB files of RDAREA2, RDAREA4, and RDAREA6.
- Moves the backups of the HiRDB files.
- Deletes the HiRDB files of RDAREA2, RDAREA4, and RDAREA6.
Operations on the target machine
- Use the pdfmkfs command to create HiRDB file system areas.
- Use the pdfrstr command to restore the HiRDB files that you moved.
- Example
pdfmkfs -n 30 -l 10 -k DB /area2 1
pdfmkfs -n 30 -l 10 -k DB /area4 1
pdfmkfs -n 30 -l 10 -k DB /area6 1
pdfrstr /tmp/bk_rdarea2 /area2 2
pdfrstr /tmp/bk_rdarea4 /area4 2
pdfrstr /tmp/bk_rdarea6 /area6 2
|
- Explanation
- Creates the HiRDB files system areas RDAREA2, RDAREA4, and RDAREA6. Use the same path name as was used on the source machine. If you cannot use the same path name, create a symbolic link aliasing the original path to the directory on the target machine that contains the files.
- Lists the HiRDB files of RDAREA2, RDAREA4, and RDAREA6
(9) Use the pdstart command to start HiRDB normally
(10) Use CREATE INDEX to re-create the non-partitioning key index
CREATE INDEX INDEX2 on TABLE1(C2) IN ((RDAREA3),(RDAREA4));
|
Re-create the non-partitioning key index that you deleted in step (3).
(11) Use the pdcopy command to back up the RDAREAs
pdcopy -m /rdarea/mast/mast01 -M r -a -b /pdcopy/backup02 -p /pdcopy/list02
|
- Explanation
- -m: Specifies the name of the first HiRDB file in the master directory RDAREA.
- -M: Specifies the backup acquisition mode.
- -a: Specifies that all RDAREAs are to be backed up. Because the master directory RDAREA and the data dictionary RDAREAs are updated when an RDAREA is moved, we recommend that you back up all RDAREAs at this time.
- -b: Specifies the name of the backup file.
- -p: Specifies the output destination of the pdcopy command's processing results listing.
- For details about making backups, see 6. Backup Procedures.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.