Nonstop Database, HiRDB Version 9 System Operation Guide

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

15.2.2 Example

This example adds a user RDAREA named RDAREA1.

Procedure
  1. Use the pdfmkfs command to create a HiRDB file system area for the RDAREA. This operation is not required if you add the RDAREA to an existing HiRDB file system area.
  2. Create a control statements file for the pdmod command.
  3. Use the pdmod command to add the RDAREA.
  4. Use the pdlogswap -d sys -w command to swap the system log files.
  5. Use the pdcopy command to back up data.
  6. Use the pdbufmod command to allocate a global buffer.
  7. Update the pdbuffer operand.
The procedure step numbers correspond to the paragraph numbers in the explanation that follows. For example, step 3 above is explained in paragraph (3) below.
Organization of this subsection
(1) Use the pdfmkfs command to create a HiRDB file system area for the RDAREA
(2) Create the control statements file for the pdmod command
(3) Use the pdmod command to add the RDAREA
(4) Use the pdlogswap -d sys -w command to swap the system log files
(5) Use the pdcopy command to back up data
(6) Use the pdbufmod command to allocate a global buffer
(7) Update the pdbuffer operand

(1) Use the pdfmkfs command to create a HiRDB file system area for the RDAREA

 
pdfmkfs -n 100 -l 10 -k DB -i /rdarea/area01
 

Explanation
A HiRDB file system area (/rdarea/area01) is created for the RDAREA.
-n: Specifies in megabytes the size of the HiRDB file system area.
-l: Specifies the maximum number of HiRDB files that can be created in the HiRDB file system area.
-k: Specifies DB to create a HiRDB file system area for RDAREAs.
-i: Specifies that the HiRDB file system area is to be initialized.
/rdarea/area01: Specifies the name of the HiRDB file system area to be created.

(2) Create the control statements file for the pdmod command

A control statements file (/pdmod/create01) that contains the pdmod command's create rdarea statement is created. The following are the contents of the control statements file:

 
create rdarea RDAREA1                              1
   globalbuffer gbuf01                             2
   for user used by PUBLIC                         3
   server name bes1                                4
   page 4096 characters                            5
   storage control segment 10 pages                6
   file name "/rdarea/area01/file01"               7
      initial 1000 segments;                       8
 

Explanation
  1. Specifies a name for the RDAREA to be created (RDAREA1).
  2. Specifies the global buffer (gbuf01) to be allocated for RDAREA1. Because a global buffer specified with this operand will not be allocated when HiRDB is started subsequently, you will have to change the value specified in the pdbuffer operand. Note that if you allocate a global buffer in step (6) below, you need not specify this operand.
  3. Specifies that RDAREA1 is to be a public RDAREA.
  4. Specifies the name of the server to which the RDAREA is to be added; this option is specified only in the case of a HiRDB parallel server configuration.
  5. Specifies the page length.
  6. Specifies the segment size.
  7. Specifies the HiRDB file that is to constitute the RDAREA; /rdarea/rdarea01 is the HiRDB file system area created in step (1).
  8. Specifies the number of HiRDB file segments.

(3) Use the pdmod command to add the RDAREA

 
pdmod -a /pdmod/create01
 

Explanation
-a: Specifies the name of the control statements file for the pdmod command created in step (2).

(4) Use the pdlogswap -d sys -w command to swap the system log files

 
pdlogswap -d sys -w
 

(5) Use the pdcopy command to back up data

 
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. When an RDAREA is reinitialized, the contents of the master directory RDAREA and the data dictionary RDAREA are updated. Therefore, all RDAREAs are backed up here.
-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.

(6) Use the pdbufmod command to allocate a global buffer

This step adds a new global buffer (gbuf01) and allocates it to RDAREA1.

 
pdbufmod -k add -a gbuf01 -r RDAREA1 -n 1000
 

Explanation
-k add: Specifies that a global buffer is to be added.
-a: Specifies the name of the global buffer being added.
-r: Specifies the RDAREA for which the global buffer is being allocated.
-n: Specifies the sector count of the global buffer.

Note, however, to use the pdbufmod command, both of the following conditions must be satisfied:

(7) Update the pdbuffer operand

The global buffer allocated in this procedure becomes invalid if HiRDB is terminated normally or through a planned termination. Therefore, change the pdbuffer operand specification while HiRDB is stopped. An example of the pdbuffer operand specification follows:

                         :
pdbuffer -a gbuf01 -r RDAREA1,RDAREA2,RDAREA3 -n 1000
                         :

Explanation
The added RDAREA (RDAREA1) is assigned to a global buffer (gbuf01).

Note that you can use the system reconfiguration command (pdchgconf command) to change the pdbuffer operand specification while HiRDB is running. However, to use the system reconfiguration command, you must have HiRDB Advanced High Availability. For details about changing HiRDB system definitions using the system reconfiguration command, see 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).

We recommend that after the command has executed you check whether the execution results are correct. For details on how to check command execution results, see the manual HiRDB Version 9 Command Reference.