11.1.2 Setting the environment for a multi-HiRDB

Organization of this subsection
(1) Setting environment variables
(2) Specifying HiRDB system definitions
(3) Specifying client environment definitions
(4) Installing utility special units
(5) Library sharing

(1) Setting environment variables

Each HiRDB administrator separately defined with a multi-HiRDB server uses the PDDIR environment variable to identify his/her own HiRDB. Specify the HiRDB directory in the PDDIR environment variable for each HiRDB administrator.

If you specify $PDDIR/bin in the PATH environment variable for each HiRDB, only the previously specified HiRDB operation commands in PATH become available. To operate each HiRDB individually, you should provide a window for each HiRDB and define the environment variable for each window.

For details about the environment variables, see 2.3.3 Setting environment variables.

(2) Specifying HiRDB system definitions

Create a HiRDB system definition for each HiRDB. Specify the following information appropriately to each HiRDB in the HiRDB system definition:

(3) Specifying client environment definitions

Use the PDNAMEPORT operand of the client environment definition to specify a HiRDB to be accessed from a client. Specify the port number of a HiRDB to be accessed in the PDNAMEPORT operand. For details about the client environment definition, see the manual HiRDB Version 8 UAP Development Guide.

(4) Installing utility special units

When the utility special unit facility is to be provided for a multi-HiRDB, one of the following system configurations can be selected:

  1. System configuration in which one utility special unit is installed for each HiRDB.
  2. System configuration in which one utility special unit is shared among multiple HiRDBs.

Configuration 1 should be used if different applications are to be executed by the individual HiRDBs. Configuration 2 should be used when the system switching facility is to be used in a mutual system switching configuration.

Figures 11-1 and 11-2 show examples of utility special unit installation for a multi-HiRDB.

Figure 11-1 Example of utility special unit installation for a multi-HiRDB: One utility special unit provided for each HiRDB

[Figure]

Figure 11-2 Example of utility special unit installation for a multi-HiRDB: One utility special unit shared among multiple HiRDBs

[Figure]

(5) Library sharing

All HiRDBs constituting the multi-HiRDB can share a portion of a library in the installation directory (/opt/HiRDB_S or /opt/HiRDB_P). You can save memory by using the pdmemsv -s command to share a portion of the library.

To share a portion of a library, the following conditions must be satisfied:

If you share a library, place the installation directory and the HiRDB directory on separate volumes. If you do this and a hard disk failure affects the installation directory, you can use the pdmemsv -d command to cancel library sharing and enable HiRDB operation. The following shows the procedure for sharing a library:

# pdsetup /USERS/DB1           1
# pdsetup -d /USERS/DB1        2
# PDDIR="USERS/DB1"            3
# export PDDIR
# $PDDIR/bin/pdmemsv -s        4
# pdsetup /USERS/DB1           5

Explanation:
This procedure must be executed by the superuser.
  1. Sets up the HiRDB environment in a directory other than the installation directory.
  2. Releases the HiRDB registration from the OS. When the KFPS0036-Q message is displayed, enter n as the response.
  3. Defines the PDDIR environment variable.
  4. Registers the HiRDB into the OS again.
Note
When reinstalling HiRDB, use the pdmemsv -d command to release library sharing. Once the pdsetup -d command has executed to release registration from the OS, reexecute the pdmemsv command according to the previous procedure.