Nonstop Database, HiRDB Version 9 System Operation Guide

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

17.3 Environment setup

Executor: Superuser and HiRDB administrator

The figure below shows the procedure for setting up an environment for using Java stored procedures and Java stored functions. The explanation here assumes that the environment setup for the Java Virtual Machine and JDBC Driver has been completed.

When the environment setup explained here is completed, Java stored procedures and Java stored functions can be created and executed; for details on the creation and execution procedures, see the HiRDB Version 9 UAP Development Guide.

Figure 17-5 Environment setup procedure for use of Java stored procedures and Java stored functions

[Figure]

Note
The numbers to the left of the processing boxes correspond to the paragraph numbers of the explanations on the following pages. For example, step 3 is explained in paragraph (3) below.

#: This step is applicable to the HP-UX, Solaris, and AIX editions only; it is not required for the Linux edition. This step is also not required if the POSIX Library version is already being used.

Organization of this section
(1) Create a directory for storing JAR files
(2) Use the pdstop command to terminate HiRDB normally
(3) Specify Java-related HiRDB system definition operands
(4) Use pdsetup command to set up POSIX Library version (applicable to HP-UX, Solaris, and AIX editions only)
(5) Use the pdstart command to start HiRDB normally

(1) Create a directory for storing JAR files

Create a directory for storing the JAR files. The name of the directory created here will be specified in the pd_java_archive_directory operand in step (3).

Hint
  • Create a special directory in which to store JAR files.
  • Do not store files other than installed JAR files in the JAR directory.

(2) Use the pdstop command to terminate HiRDB normally

 
pdstop
 

If you use the system reconfiguration command (pdchgconf command), you do not need to restart HiRDB normally, because this command enables you to modify HiRDB system definitions while HiRDB is running. Note that HiRDB Advanced High Availability must be installed in order to use this command. For details about modifying HiRDB system definitions while HiRDB is running, see 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).

(3) Specify Java-related HiRDB system definition operands

Specify the following Java-related operands in the HiRDB system definition:

pd_java_option
Specifies the Java option.

pd_java_routine_stack_size
Specifies in bytes the size of the stack to be used by external Java routines.

pd_java_archive_directory
Specifies the directory for storing the JAR files.

pd_java_classpath
Specifies a Java class path.

pd_java_runtimepath
Specifies the root directory of the Java Runtime Environment.

pd_java_libpath
Specifies the library directory of the Java Virtual Machine.

pd_java_stdout_file
Specifies the output destination file for the Java Virtual Machine's standard output and standard error output#1.

pd_java_castoff
Specifies whether to use a specific trigger to terminate the server process in which the Java virtual machine was started.#2

#1
We recommend that you specify this operand when you are debugging Java stored procedures or Java stored functions. Do not specify this operand for regular operations.

#2
Consider specifying this operand in the cases listed below. Do not specify this operand for regular operations.
  • Use of a Java virtual machine has increased the memory size, severely reducing the system's free memory.
  • Because of the upper limit for the size of the stack set up by a Java virtual machine in another connection, when an SQL statement that has many search conditions is executed in a connection that does not use a Java virtual machine, the stack cannot be expanded, and as a result the server process aborts with a segmentation error.

(4) Use pdsetup command to set up POSIX Library version (applicable to HP-UX, Solaris, and AIX editions only)

To use a Java stored procedure or Java stored function, the POSIX library version must be used. To use the POSIX library version, specify the -l option in the pdsetup command that is executed at the time of environment setup for HiRDB. The -l option should be specified in the pdsetup command at the time a new HiRDB is installed.

If HiRDB is already running but the POSIX library version is not being used, apply the procedure described below to change HiRDB to the POSIX library version.

Procedure
  1. Use the pdsetup -d command to delete HiRDB from the OS. Choose y in response to the message.
    In the case of a HiRDB parallel server configuration, execute the pdsetup -d command at all server machines.
  2. Execute the pdsetup command with POSIX specified in the -l option.
    In the case of a HiRDB parallel server configuration, execute the pdsetup -l command at all server machines.
    Note
    • Because it supports POSIX, you do not need to perform the above procedure for the HP-UX (IPF) edition of HiRDB.
    • HiRDB Version 5.0 and older versions do not support the POSIX library version. When HiRDB is being upgraded from Version 5.0 or older, use this procedure to change HiRDB to the POSIX library version.
    • If the -l option was not specified in the pdsetup command when a new HiRDB was being installed, use this procedure to change the HiRDB to the POSIX library version.

(5) Use the pdstart command to start HiRDB normally

 
pdstart