Hitachi

Hitachi Advanced Database Setup and Operation Guide


8.4 Setting environment variables

This section explains the environment variables that will be set by HADB administrators and the OS users that belong to the HADB administrators group.

Make sure that the values that you set are valid in the shell when the HADB server is used. For details about how to set the environment variables, see the documentation for the operating system you are using.

If you are using the multi-node function, set the environment variables on all nodes.

Important

The HADB server must be stopped before you set environment variables. You can stop the HADB server by executing the adbstop command.

The following table shows the values to be specified in the environment variables.

Table 8‒7: Values to be specified in the environment variables

No.

Environment variable

Value to be specified

1

LANG

Specify the character encoding for the operating system.#

When the HADB server is used in a Japanese language environment:

Select either of the following character encodings:

  • Unicode (UTF-8)

    Specify ja_JP.UTF-8 in this environment variable.

  • Shift-JIS

    Specify ja_JP.SJIS in this environment variable.

When the HADB server is used in an English language environment:

Unicode (UTF-8) is used as the character encoding. Specify en_US.UTF-8 in this environment variable.

2

LD_LIBRARY_PATH

Add the following directories to this environment variable:

  • $ADBDIR/lib

When either of the following conditions are satisfied, also add $ADBDIR/client/lib to this environment variable:

  • The adbsql command will be executed on the HADB server

  • Applications that use the CLI function will be developed or executed on the HADB server

3

PATH

Add the following directories to this environment variable:

  • $ADBDIR/bin

  • $ADBDIR/client/bin

4

TZ

Specify the time zone of the machine on which the HADB server is to be installed.

Do not specify a time zone that supports leap seconds.

Multi-node function

If you are using the multi-node function, specify the same value for this environment variable on all nodes.

5

ADBDIR

This environment variable is used to specify the absolute path to the server directory.

6

ADBLANG

Specify the character encoding to be used by the HADB server.#

When the HADB server is used in a Japanese language environment:

Select either of the following character encodings:

  • Unicode (UTF-8)

    Specify UTF8 in this environment variable.

  • Shift-JIS

    Specify SJIS in this environment variable.

If you specify SJIS, take one of the following actions to prevent multi-byte Shift-JIS characters from being output to syslog:

  • Apply the extended syslog function to the HADB server and then convert character encoding for syslog (convert from Shift-JIS to Unicode).

    For details about the extended syslog function, see 10.4.6 Converting character encoding and improving reliability for syslog (Applying the extended syslog function).

  • Do not use multi-byte characters when you specify the following items:

    • Names specified in definition SQL statements (such as table names, index names, and column names)

    • Directory names and file names that will be used by HADB

  • Specify 0 in the ADBSYSLOGLV environment variable.

    When 0 is specified in ADBSYSLOGLV, no HADB messages will be output to syslog. Note that all HADB messages are output to the message log files.

When the HADB server is used in an English language environment:

Unicode (UTF-8) is used as the character encoding. Specify UTF8 in this environment variable.

Multi-node function

If you are using the multi-node function, specify the same value for this environment variable on all nodes.

7

ADBMSGLOGSIZE

Specify, in megabytes, the maximum size of each server message log file. A value between 1 and 2,000 can be specified. The HADB server creates four server message log files.

If this environment variable is omitted, the maximum size of each server message log file is 16 megabytes.

8

ADBSYSLOGLV

If this environment variable is specified, you can suppress the messages that are output to syslog based on the output level.

To suppress the messages that are output to syslog, specify this environment variable. Specify a value between 0 and 6 for the output level.

For a list of the output levels of messages output to syslog, see 10.4.5 Suppressing message output to syslog.

An error occurs if a value outside the range of 0 to 6 is specified for the output level.

If this environment variable is not specified, 6 is assumed for the output level.

9

ADBCLTDIR

Specify the directory in which the HADB client's various types of files are to be stored. Specify the absolute path to the server directory for this environment variable.

Set this environment variable when either of the following conditions are satisfied:

  • The adbsql command will be executed on the HADB server

  • Applications that use the CLI function will be developed or executed on the HADB server

10

ADBCLTLANG

Specify the character encoding to be used by HADB clients.#

When the HADB server is used in a Japanese language environment:

Select either of the following character encodings:

  • Unicode (UTF-8)

    Specify UTF8 in this environment variable.

  • Shift-JIS

    Specify SJIS in this environment variable.

When the HADB server is used in an English language environment:

Unicode (UTF-8) is used as the character encoding. Specify UTF8 in this environment variable.

Set this environment variable when either of the following conditions are satisfied:

  • The adbsql command will be executed on the HADB server

  • Applications that use the CLI function will be developed or executed on the HADB server

11

ADBSQLNULLCHAR

If the adbsql command's retrieval results might contain a null value, specify in this environment variable the character string to be used to indicate the null value (character string displaying a null value). A character string consisting of 0 to 32 bytes is permitted. If a zero-byte character string is specified, the space is displayed as the null value.

If this environment variable is omitted, the asterisk (*) is displayed as the null value.

Specify this environment variable when retrieval data might contain asterisks or if you want to display a desired character as the null value.

Note that if a multi-byte character is specified, the retrieval results might not be displayed correctly.

Consider setting this environment variable when the adbsql command will be executed on the HADB server.

12

CLASSPATH

Specify this environment variable if you plan to develop or execute Java applications on the HADB server (when using the JDBC driver). Specify the absolute path to the JAR file for this environment variable. Specify the following path:

  • $ADBDIR/client/lib/adbjdbc8.jar

If you change the preceding storage location for the JAR file, specify the absolute path of the new storage location.

To work directly with classes provided by the JDBC driver, such as with non-standard JDBC methods provided by the JDBC driver (for example, connection information setup and acquisition interface methods), specify this environment variable before compiling the application.

#

Select the same character encoding for the LANG, ADBLANG, and ADBCLTLANG environment variables.

Example 1: Unicode (UTF-8) is used in a Japanese language environment

     LANG="ja_JP.UTF-8"
     ADBLANG=UTF8
     ADBCLTLANG=UTF8

Example 2: Unicode (UTF-8) is used in an English language environment

     LANG="en_US.UTF-8"
     ADBLANG=UTF8
     ADBCLTLANG=UTF8