Hitachi

Hitachi Advanced Database Setup and Operation Guide


3.5.2 Editing the definition files

Edit the server definition files necessary for operating the HADB server and the client definition files necessary for executing applications and commands.

A file template is available for each definition file. Therefore, copy the file template and edit it.

The templates for the definition files are stored in the following locations:

■ Storage locations of definition file templates
  • Server definition file template: /home/adbmanager/server/sample/conf/server.def

  • Client definition file template: /home/adbmanager/server/sample/conf/client.def

The definition files (server.def and client.def) created by copying and editing the templates are stored in the following location:

This subsection explains how to use the vi command to edit each definition file.

Note

You can also edit each definition file using other text editors.

Organization of this subsection

(1) Editing the server definition file

  1. Copy the server definition file template.

    As the HADB administrator (adbmanager), enter the operating system command below and press Enter. The server definition file template is copied.

    cp /home/adbmanager/server/sample/conf/server.def /home/adbmanager/server/conf/
  2. Open the copied server definition file template.

    Enter the operating system command below and press Enter. When you execute the vi command, the server definition file is opened in edit mode.

    vi /home/adbmanager/server/conf/server.def
  3. Specify the DB directory in which to store the database.

    Press the I key to shift to insert mode. Once you are in insert mode, use the cursor keys to move the cursor to the following operand:

    set adb_db_path = XXXXX

    After you have moved the cursor, delete XXXXX. Then, enter the absolute path to the DB directory (/home/adbmanager/db).

    ■ Input result

    set adb_db_path = /home/adbmanager/db
  4. Change values specified for the TBLBUF01 global buffer.

    Use the cursor keys to move the cursor to the following operand:

    adbbuff -g TBLBUF01 \
            -n ADBUTBL01 \
            -p 1000000 \
            -v 1024
    Note

    Interpret \ as a half-width backslash.

    After repositioning the cursor, delete 1000000 from the -p option. Then, enter 1000.

    Next, delete 1024 from the -v option. Then, enter 64.

    ■ Input result

    adbbuff -g TBLBUF01 \
            -n ADBUTBL01 \
            -p 1000 \
            -v 64
  5. Change a value specified for the IDXBUF01 global buffer.

    Use the cursor keys to move the cursor to the following operand:

    adbbuff -g IDXBUF01 \
            -n ADBUIDX01 \
            -p 2500000
    Note

    Interpret \ as a half-width backslash.

    After repositioning the cursor, delete 2500000 from the -p option. Then, enter 250.

    ■ Input result

    adbbuff -g IDXBUF01 \
            -n ADBUIDX01 \
            -p 250
    Note

    A global buffer is the area that is used for inputting data to, and outputting data from, tables stored in a DB area.

  6. Finish editing the server definition file.

    For this environment, there is no need to edit operands other than those described above. Press Esc to shift to command mode. Once you are in command mode, enter the following command and press Enter:

    :wq

    The content that was specified in edit mode is saved. The information necessary for operating the HADB server is now set in the server definition file.

(2) Editing the client definition file

  1. Copy the client definition file template.

    Enter the operating system command below and press Enter. The client definition file template is copied.

    cp /home/adbmanager/server/sample/conf/client.def /home/adbmanager/server/conf/
  2. Open the copied client definition file template.

    Enter the operating system command described below and press Enter. When you execute the vi command, the client definition file is opened in edit mode.

    vi /home/adbmanager/server/conf/client.def
  3. Specify the host name of the HADB server.

    Use the cursor keys to move the cursor to the following operand:

    set adb_clt_rpc_srv_host = XXXXX

    After you have moved the cursor, delete XXXXX. Then, enter localhost.

    ■ Input result

    set adb_clt_rpc_srv_host = localhost
  4. Finish editing the client definition file.

    For this environment, there is no need to edit operands other than those described above. After you have entered the host name in edit mode, press Esc to shift to command mode. Once you are in command mode, enter the following command and press Enter:

    :wq

    The content that was specified in edit mode is saved. The information necessary for executing applications and commands is now set in the client definition file.

    Note

    The client definition file need to be defined on the HADB server that executes applications or on the HADB client. In this case, in order to execute applications on the HADB server, the client definition file located on the HADB server is edited.

(3) Related items