pdsetup (Register or delete HiRDB system in OS)

Function

The pdsetup command registers a HiRDB system under the HiRDB directory into the OS so that part of the HiRDB system is started or terminated when the OS is started or terminated. This command can also copy the load module of an installed HiRDB into a specified HiRDB directory.

Executor

Superuser

Format

HP-UX (32-bit mode)

/opt/HiRDB_S/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-p program-name]
    [-l load-type](-k {on|off})}]
  HiRDB-directory

HP-UX (64-bit mode), Solaris (64-bit mode), AIX 5L (64-bit mode), and Linux

/opt/HiRDB_S/bin/pdsetup
  [{-d [-f]|-c character-code-classification(-k {on|off})}]
  HiRDB-directory

Solaris (32-bit mode) and AIX 5L (32-bit mode)

/opt/HiRDB_S/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-l load-type](-k {on|off})}]
  HiRDB-directory

HP-UX (32-bit mode)

/opt/HiRDB_P/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-p program-name][-l load-type](-k {on|off})}]
  HiRDB-directory

HP-UX (64-bit mode), Solaris (64-bit mode), AIX 5L (64-bit mode), and Linux

/opt/HiRDB_P/bin/pdsetup
  [{-d [-f]|-c character-code-classification(-k {on|off})}]
  HiRDB-directory

Solaris (32-bit mode) and AIX 5L (32-bit mode)

/opt/HiRDB_P/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-l load-type](-k {on|off})}]
  HiRDB-directory

Options

Specifies that the HiRDB system under the HiRDB directory is to be deleted from the OS. When this option is omitted, the HiRDB system is registered into the OS.

If you specify the -d option, the following message is displayed, asking whether or not to delete the files required for HiRDB execution:

KFPS00036-Q Specify whether to delete files necessary for execution from specified HiRDB home directory ?

[y:Yes , n:No]

If you enter y, the command deletes the files and directories required for HiRDB execution. In this case, the files required for HiRDB execution will be copied from the installation directory the next time the pdsetup command is executed.

If you enter n, the command does not delete the files or directories.

Enter y in the following cases:

Rules

  1. When the -d option is specified, deletion of the HiRDB directory from the OS may fail if that directory is in use. If this happens, use the rm command to delete the applicable files and directories from the OS.
  2. If you specify -d option and enter y as a response and if there are many HiRDB-created files in the HiRDB directory, command execution may take some time. In this case, use the rm OS command or the pdcspool -d 0 command to delete any unneeded files beforehand.
  3. If you are deleting the HiRDB directory, be sure to terminate any UAP that is using Java Virtual Machine (JVM). Otherwise, the HiRDB directory may not be deleted completely. In this case, use the rm OS command to delete the HiRDB directory.

Specifies registration and deletion of HiRDB from the operating system. The -f option can be specified only in combination with the d option. Even when HiRDB is running or is being abnormally terminated, this option can force the registration and deletion of the HiRDB from the operating system. If this option is omitted, any HiRDB processing is immediately suspended. The load modules stored in the HiRDB directory are not deleted. This option should be specified only when the pdstop -f command cannot be accepted. Normally, the pdsetup -d command should be executed after stopping the HiRDB system using the pdstop command. If the -f option is specified, some of the HiRDB processes may remain unstopped. If this happens, use the ps command of the operating system to locate those processes and use the kill command to delete them. Without this action, the HiRDB system may fail to start when the pdsetup command is executed the next time.

[Figure]<Other than Solaris or Linux: sjis> or <Solaris or Linux: ujis>

Specifies the type of character codes used by the HiRDB system:

sjis
Shift JIS Kanji codes
chinese
EUC Chinese Kanji codes
ujis
EUC Japanese Kanji codes
utf-8#
Unicode(UTF-8)
lang-c
One-byte character codes
#
According to the ISO/IEC 10646 standard, a range of from 1 to 4 bytes is assigned per character and bytes 5 and 6 are reserved for a future standard. Although HiRDB supports a range of 1 to 6 bytes per character, problems may be introduced in the future if you use the range of bytes from 5 to 6 in which no characters have been assigned.
Rules
  1. If this option is specified when the HiRDB directory and installation directory are different, and if the HiRDB directory already contains lib, the -c option is ignored and the previous character codes setting is inherited.
  2. To change the character codes setting, execute pdsetup -d to delete the HiRDB directory once from the OS, and then re-execute pdsetup -c. Note that the -c and -d options are mutually exclusive. If both of them are specified, the -c option is ignored.
  3. For a HiRDB/Parallel Server, specify the same character codes type for all servers.
  4. To use the HiRDB External Data Access facility, specify SJIS, UJIS, or lang-c.
  5. utf-8 cannot be specifies when the version of HiRDB Text Search Plug-in Version 2 is 02-02 or earlier.

Specifies the name of the program to which HiRDB can link.

OmniBack
Specify this option to use JP1/OmniBack II for backup and recovery purposes.
Rules
  1. If you entered n with the previous pdsetup -d command, this option is ignored, if specified.
  2. If you specify this option, you must execute the pdsetup command specifying this option on all hosts that constitute the HiRDB.
  3. If the HiRDB directory is the installation directory, the -p option always takes effect. If these directories are different and the HiRDB directory has lib, the -p option is ignored, in which case the previous option takes effect. To change the -p option, delete the HiRDB directory once with the pdsetup -d command, then re-execute the pdsetup command.
  4. The -p and -d options are mutually exclusive. If both are specified together, the -p option is ignored.

Specifies the type of load module.

If you entered n with the previous pdsetup -d command, this option is ignored, if specified, in which case the previous option takes effect.

posix
Specifies that the POSIX library version of the load module is to be used. The POSIX library version of the load module is required in order to use Java stored procedures, Java stored functions, the Directory Server linkage facility, and the HiRDB External Data Access facility.
Rules
  1. If the HiRDB directory is the installation directory, the -l option always takes effect. If these directories are different and the HiRDB directory has the /lib directory, the -l option is ignored, in which case the previous option takes effect. To use a POSIX library version of the load module, delete the HiRDB directory once with the pdsetup -d command, then re-execute the pdsetup command. Note that the -l and -d options are mutually exclusive. If both are specified, the -l option is ignored.

Specifies the HiRDB termination method when the OS shuts down. Note that this option is not supported by the AIX 5L version of HiRDB.

on:
Terminates HiRDB explicitly and forcibly when the OS shuts down.
off:
Terminates HiRDB normally when the OS shuts down or when HiRDB termination is to depend on forced termination of the OS.

When on is specified, this command terminates HiRDB forcibly regardless of its operating status when the OS shuts down; therefore, if HiRDB is not running, an error message may be displayed.

For details about the HiRDB termination method during OS shutdown, see the manual HiRDB Version 8 System Operation Guide.

Command arguments

Specifies the HiRDB directory used to install the HiRDB system. In the case of a multi-HiRDB system, this command must be executed for each HiRDB system with the appropriate HiRDB directory specified.

Do not specify a symbolically linked HiRDB directory.

Rules

  1. The pdsetup command can be executed only while HiRDB is shut down. Note that if you specify only the -k option, you can execute the pdrisechk command whether or not HiRDB is active.
  2. The pdsetup command must be executed at each server machine.

Notes

  1. The following are the pdsetup command's return codes:
    0: Normal termination
    1: Privilege error, file creation error, locking error, etc.
  2. The result of the pdsetup command can be determined by the existence of the HiRDB directory under /etc/inittab.
  3. While the pdsetup command is executing, do not edit /etc/inittab with an editor. Furthermore, do not execute the pdsetup command or OpenTP1's dcsetup command for more than one HiRDB at any one time on the same machine.
    If you do, the contents of /etc/inittab may be damaged. If the contents of /etc/inittab are damaged, a backup file named inittabX (X: 1, 2, or 3) is saved under $PDDIR/conf/inittab. In this case, recover /etc/inittab with the following procedure:
    1. Log in as the superuser.
    2. Copy the files to be recovered from $PDDIR/conf/Inittab to /etc/inittab.
    3. Execute /etc/init q.
  4. In the case of HiRDB version 07-03 or later, the jre directory is not created under the HiRDB directory when the pdsetup command is executed because the Java execution environment (JRE) is not included. If you use Java stored routines, you must acquire JRE.