Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


23.4.1 Setting up an embedded database

This subsection describes the procedures for installing an embedded database, setting up the environment for operating the embedded database, and setting up the embedded database.

Organization of this subsection

(1) Installing an embedded database

If you want to use an embedded database as the JP1/AJS3 - Manager scheduler database, execute the following command:

ajsembdbinstl

For details about the ajsembdbinstl command, see ajsembdbinstl in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

Notes on installation:
  • Before you execute the ajsembdbinstl command, make sure that you are a user who has administrator privileges. If a user who does not have administrator privileges attempts to execute the command, an error message appears and installation is canceled.

  • Do not install an embedded database on a network drive.

  • When an embedded database is installed, the tmp folder is created immediately under the installation drive. Do not delete this folder. It is used by the embedded database.

  • In a Windows environment, the character encoding used by the embedded database is Shift-JIS (SJIS).

(2) Setting up the embedded database environment

To set up an embedded database environment:

  1. Stop all the services.

    Stop all the services that access the scheduler database. Such services include the JP1/AJS3 on the physical host and all logical hosts.

  2. In UNIX, delete the environment setting information from the shared memory.

    Use the ajsshmdel command to delete the environment setting information in the shared memory.

    ajsshmdel >/dev/null 2>&1
  3. Execute commands to set up the embedded database environment.

    Use the ajsembdbbuild command to set up the embedded database environment.

    When executed, the ajsembdbbuild command performs the following operations:

    • Creates the definition information for the embedded database.

    • Creates an area for the embedded database.

    • Starts the embedded database system.

For details about the ajsembdbbuild command, see ajsembdbbuild in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

The following shows examples of specifying the ajsembdbbuild command when a large-scale embedded database environment is set up. The examples also provide the combination of item numbers shown in Table 23-2 and Table 23-3.

Supplementary note:

If the system files are duplicated and the system log is not used (combination 2-A, 4-A or 6-A in Table 23-2 and Table 23-3), the environment cannot be set up.

Cautionary notes:
  • Register the name of the host on which the embedded database environment is set up in the hosts file or DNS.

  • If you register the name of the host on which the embedded database environment is created in the jp1hosts or jp1hosts2 definition file, the host name does not take effect as the host name used for the embedded database.

  • Do not use aliases for the name of the host on which the embedded database environment is set up.

  • To configure an embedded-database environment on a physical host, set the physical host name by using 1 to 63 bytes.

(a) For Windows

The specification examples in this subsection assume that the following values are set. Create the following directories before executing the ajsembdbbuild command:

  • Data area creation directory: d:\EmbDB\RDArea

  • System file area creation directory 1: e:\EmbDB\SYSArea1

  • System file area creation directory 2: f:\EmbDB\SYSArea2

  • Unload log file creation directory: g:\EmbDB\Unload_Log

  • Embedded database installation directory: c:\Program Files#1\HITACHI\JP1AJS2\embdb\_JF3

  • Port number of the embedded database: 22223

  • Embedded database setup identifier: _JF3

  • If the system files are not duplicated and the system log is not used#2 (combination 5-A in Table 23-2 and Table 23-3):

    ajsembdbbuild -l 
    -d "d:\EmbDB\RDArea,e:\EmbDB\SYSArea1"
     -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JF3" 
    -id _JF3  -p 22223
  • If the system files are not duplicated and unloading is used (combination 5-B in Table 23-2 and Table 23-3):

    ajsembdbbuild -l 
    -d "d:\EmbDB\RDArea,e:\EmbDB\SYSArea1" -bs 
    -bl g:\EmbDB\Unload_Log -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JF3" 
    -id _JF3  -p 22223
  • If the system files are duplicated and unloading is used (combination 6-B in Table 23-2 and Table 23-3):

    ajsembdbbuild -l 
    -d "d:\EmbDB\RDArea,e:\EmbDB\SYSArea1,f:\EmbDB\SYSArea2" 
    -br -bl g:\EmbDB\Unload_Log 
    -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JF3" 
    -id _JF3  -p 22223
#1:

For 64-bit versions of Windows, replace Program Files with Program Files (x86).

#2:

To use the backup enhancement function, specify the -b option for the ajsembdbbuild command.

(b) For UNIX

The specification examples in this subsection assume that the following values are set. Create the following directories before executing the ajsembdbbuild command:

  • Unload log file creation directory: /Unload_Log_JF3

  • Embedded database work area directory: /WorkArea_JF3

  • Embedded database practical directory: /opt/jp1ajs2/embdb/_JF3

  • Port number of the embedded database: 22223

  • Embedded database setup identifier: _JF3

  • Data area creation directory: /RDArea_JF3

  • System area creation directory 1: /SYSArea1_JF3

  • System area creation directory 2: /SYSArea2_JF3

  • If the system files are not duplicated and the system log is not used# (combination 5-A in Table 23-2 and Table 23-3):

    ajsembdbbuild -l -d "/RDArea_JF3,/SYSArea1_JF3" 
    -i /opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
  • If the system files are not duplicated and unloading is used (combination 5-B in Table 23-2 and Table 23-3):

    ajsembdbbuild -l 
    -d "/RDArea_JF3,/SYSArea1_JF3" -bs -bl /Unload_Log_JF3 
    -i opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
  • If the system files are duplicated and unloading is used (combination 6-B in Table 23-2 and Table 23-3):

    ajsembdbbuild -l 
    -d "/RDArea_JF3,/SYSArea1_JF3,/SYSArea2_JF3" 
    -br -bl /Unload_Log_JF3 -i /opt/jp1ajs2/embdb/_JF3 
    -id _JF3 -p 22223
#:

To use the backup enhancement function, specify the -b option for the ajsembdbbuild command.

(3) Environment setting parameter settings

When you change the number of characters that can be specified for the unit name of the detailed definition of a unit, the comment for the detailed definition of a unit, and the exclusive jobnet name of the schedule setting in a UTF-8 environment in UNIX, change the value of the AJSCHARCODE environment setting parameter to UTF-8.

For details on setting the environment setting parameters, see 4.2 Environment setting parameter settings (for Windows) or 14.2 Environment setting parameter settings (for UNIX).

If you execute the jajs_config command after performing an advanced setup, a message (KAVS1516-E) is output and an error occurs. In this case, execute the jbssetcnf command to set the environment setting parameter. For details about the jbssetconf command, see 4.2.2 Procedure for setting the environment setting parameters by using the jbssetcnf command (for Windows),or 14.2.2 Procedure for setting the environment setting parameters by using the jbssetcnf command (for UNIX).

In addition, do not start JP1/AJS3 while you are setting the environment setting parameters, because setup is not yet complete. Perform the procedure described in 23.4.1(4) Setting up the scheduler database in an embedded database environment or 23.4.1(5) Setting up multiple scheduler databases in one or more embedded database environments, and then start JP1/AJS3.

(4) Setting up the scheduler database in an embedded database environment

The ajsembdbsetup command can be used to set up the contents of a scheduler database in an embedded database environment.

When executed, the ajsembdbsetup command performs the following operations:

An example of executing the ajsembdbsetup command in a large-scale embedded database environment is shown below. This example assumes that the following values are set:

ajsembdbsetup -F AJSROOT2 -ru -l -id _JF3 -p 22223

For details about the ajsembdbsetup command, see ajsembdbsetup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

Supplementary notes:
  • When you change the number of characters that can be specified for the unit name of the detailed definition of a unit, the comment for the detailed definition of a unit, and the exclusive jobnet name of the schedule setting in a UTF-8 environment in UNIX, execute the ajsembdbsetup command with the -e sjis option specified.

  • When the ajsembdbsetup command is executed, the environment setting parameters listed in the following table are set. Do not change the values of the environment setting parameters listed in the table. For details about the parameters, see 20.4 Setting up the scheduler service environment.

    Table 23‒10: Environment setting parameters specified when the ajsembdbsetup command is executed

    Environment setting parameter

    Definition

    Setting specified by the ajsembdbsetup command#1

    AJSDBTYPE

    Type of database

    EmbedDB

    TABLENAMEPREFIX

    Table name prefix

    Either of the following:

    • -tp option specification value

    • AJS1

    TABLENAMEPOSTFIX

    Table ID

    --

    RDBAUTHID

    RDB permission identifier

    root

    RDBUSER

    RDB access user name

    ajs2

    RDBPASSWORD

    RDB user password

    --

    RDBHOST

    Name of the host at the RDB connection destination

    127.0.0.1

    RDBPORT

    RDB connection port number

    Either of the following:

    • -p option specification value

    • 22220

    RDBIPC

    Method for communication with RDB server

    MEMORY

    RDBSENDMEMSIZE

    Send-data memory size for RDB interprocess memory communication

    Either of the following:

    • -s option specification value

    • 100

    RDBRECVMEMSIZE

    Receive-data memory size for RDB interprocess memory communication

    Either of the following:

    • -r option specification value

    • 1600

    DEFLENTYPE

    Number of characters that can be used in a UTF-8 environment

    Either of the following: #2, #3

    • For -e sjis

      sjis

    • For -e byte

      byte

    ENHANCEDBACKUP

    The setting of the backup enhancement function

    Either of the following:

    • When the -b option is specified

      yes

    • When the -b option is not specified

      no

    #1

    Settings that are numeric values use decimal numbers.

    #2

    The -e option can be specified only in UNIX.

    #3

    If you omit the -e option in Linux, byte is set.

(5) Setting up multiple scheduler databases in one or more embedded database environments

The following describes how to set up multiple scheduler databases in one or more embedded databases.

(a) Setting up a different embedded database environment for each scheduler service

To set up a different embedded database environment for each scheduler service when multiple scheduler services are defined, separately prepare the areas listed below.

Prepare the system file area, the embedded database work area, and, if necessary, the unload log creation directory:

  • Embedded database practical directory

  • Data area

  • System file area

  • Embedded database work area

  • Unload log file creation directory

If you set up multiple embedded database environments, specify port numbers and embedded database setup identifiers that are different from those for other embedded databases. That is, when executing the ajsembdbbuild or ajsembdbsetup command, you must specify a unique port number for each embedded database in the -p option. Similarly, when executing the ajsembdbinstl, ajsembdbbuild, or ajsembdbsetup command, you must specify a unique embedded database setup identifier for each embedded database in the -id option.

An example for setup is shown below.

This example assumes that the environment described in 23.4.1(2) Setting up the embedded database environment and 23.4.1(3) Environment setting parameter settings is already set up.

■ For Windows

Environment for the embedded database:
  • Data area creation directory: h:\EmbDB\RDArea

  • System file area creation directory 1: i:\EmbDB\SYSArea1

  • System file area creation directory 2: j:\EmbDB\SYSArea2

  • Unload log file creation directory: k:\EmbDB\Unload_Log

  • Embedded database installation directory: c:\Program Files#\HITACHI\JP1AJS2\embdb\_JF5

  • Scheduler service name: AJSROOT2

  • Port number of the embedded database: 22224

  • Embedded database setup identifier: _JF5

#:

For 64-bit versions of Windows, replace Program Files with Program Files (x86).

Specification of the ajsembdbinstl command:
ajsembdbinstl -s "c:\Program Files\HITACHI\JP1AJS2\tools\AJS3DB" 
-i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JF5" 
-id _JF5
Specification of the ajsembdbbuild command:
ajsembdbbuild -l 
-d "h:\EmbDB\RDArea,i:\EmbDB\SYSArea1,
j:\EmbDB\SYSArea2" -br -bl k:\EmbDB\Unload_Log 
-i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JF5" 
-p 22224 -id _JF5
Specification of the ajsembdbsetup command:
ajsembdbsetup -F AJSROOT2 -ru l -id _JF5 -p 22224

■ For UNIX

Environment of the embedded database:
  • Data area creation directory:/RDArea_JF5

  • System file area creation directory 1: /SYSArea1_JF5

  • System file area creation directory 2: /SYSArea2_JF5

  • Unload log file creation directory: /Unload_Log_JF5

  • Embedded database practical directory:/opt/jp1ajs2/embdb/_JF5

  • Scheduler service name: AJSROOT2

  • Embedded database port number: 22224

  • Embedded database setup identifier: _JF5

Specification of the ajsembdbinstl command:
ajsembdbinstl -s /opt/jp1ajs2/tools/AJS3DB 
-i /opt/jp1ajs2/embdb/_JF5 -id _JF5
Specification of the ajsembdbbuild command:
ajsembdbbuild -l 
-d "/RDArea_JF5,/SYSArea1_JF5,/SYSArea2_JF5" 
-br -bl /Unload_Log_JF5 -i :/opt/jp1ajs2/embdb/_JF5 
-p 22224 -id _JF5
Specification of the ajsembdbsetup command:
ajsembdbsetup -F AJSROOT2 -ru l -id _JF5 -p 22224

For details about the ajsembdbinstl, ajsembdbbuild, and ajsembdbsetup commands, see 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

(b) Setting up multiple scheduler databases in one embedded database environment

If you want to set up multiple scheduler databases in one embedded database environment, you must create and manage a different table for each scheduler service in the embedded database. To do this, you must change the table name prefix specified when you execute the ajsembdbsetup command.

The following shows an example of specifying the ajsembdbsetup command when setting up the second scheduler database in an embedded database environment.

  • Scheduler service name: AJSROOT3

  • Table name prefix: AJS3

  • Embedded database setup identifier: _JF0

ajsembdbsetup -F AJSROOT3 -tp AJS3 -ru l -id _JF0

For details about the ajsembdbsetup command, see ajsembdbsetup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

Cautionary notes:
  • In an embedded database environment in which multiple scheduler databases have been set up, you cannot reorganize just one scheduler database. In this environment, you need to reorganize all the scheduler databases that have been set up. If you want to reorganize only one scheduler database, you must prepare an embedded database environment for each scheduler service. For details, see (a) Setting up a different embedded database environment for each scheduler service.

  • In an embedded database environment in which multiple scheduler databases have been set up, you cannot use the ajsembdbbackup command to back up just one scheduler database. The ajsembdbbackup command can only back up all the scheduler databases set up in an embedded database environment. If a backup created by using the ajsembdbbackup command is used for restoration, all the scheduler databases are restored. Therefore, when you use the ajsembdbbackup and ajsembdbrstr commands to perform backup and restore operations, you must stop all the scheduler services that access the relevant embedded database beforehand. If you use the ajsprint command to back up only the unit definition, you can create a backup for each scheduler database without stopping scheduler services.

    If you want to use the ajsembdbbackup command to back up only one scheduler database, you must prepare an embedded database for each scheduler service. For details, see (a) Setting up a different embedded database environment for each scheduler service.

(6) Setting up an embedded database again

To set up an embedded database again:

  1. Back up the unit definition and execution agent information.

    For details about how to perform the backup, see 2.2.3 Backing up the JP1/AJS3 - Manager setup information in the JP1/Automatic Job Management System 3 Administration Guide.

  2. Stop all the services that access the scheduler database. Such services include the JP1/AJS3 on the physical host and all logical hosts.

  3. Use the ajsembdbunset -e command to delete the embedded database environment.

  4. If you need to change the embedded database practical directory, uninstall the embedded database, and then reinstall it.

  5. Use the ajsembdbbuild command to create an embedded database.

  6. Use the ajsembdbsetup command to set up the embedded database.

  7. Use the ajsembdbstop command to stop the embedded database.

  8. Start the JP1/AJS3 service.

  9. Restore the unit definition and execution agent information you backed up in step 1.

    See 2.3.4 Recovering the JP1/AJS3 - Manager setup information in the JP1/Automatic Job Management System 3 Administration Guide.

  10. Register the required jobnet for execution.

For details about commands used in the above procedure, see 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference and 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

Supplementary notes:
  • In a single embedded database environment, if you execute the ajsembdbunset command when multiple scheduler databases are set up, information about all the scheduler databases is deleted. If this happens, perform steps 1, 6, 9, and 10 above for all the scheduler databases set up for the embedded database environment.

  • If the KNAC1111-E message is output indicating an error during restoration of the execution agent information in step 9, check the registered execution agent information. If the execution agent information you acquired in step 1 has been registered, ignore the error message.

  • If you set up the embedded database of a scheduler service with a jobnet that is registered for execution, cold-start the scheduler service corresponding to the embedded database that you set up.

(7) Changing the embedded database settings to the settings for a version earlier than 10-00

To change the embedded database management function to a version earlier than JP1/AJS3 - Manager 10-00:

  1. Stop the target JP1/AJS3 service.

  2. Perform an overwrite installation of the embedded database.

    Execute the ajsembdbinstl command with the -v9standard option specified.

    For details about the ajsembdbinstl command, see ajsembdbinstl in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  3. Change the settings in the system common definition file.

    Use an editor to open the following file, and then change the settings.

    System common definition file

    - In Windows:

    embedded-database-practical-directory\conf\pdsys

    - In UNIX:

    embedded-database-practical-directory/conf/pdsys

    Before the change:

    set pd_mode_conf = MANUAL2

    After the change:

    set pd_mode_conf = AUTO#

    #

    If you changed the system common definition file in JP1/AJS3 - Manager version 9 or earlier, use that value rather than AUTO.

  4. Copy the model files to the JP1/AJS3 startup process definition file and JP1/AJS3 extended startup process definition file, which are used for database management.

    Overwrite the following files by copying the model files.

    In Windows:

    File type

    File name

    Model file

    JP1/AJS3 startup process definition file (database management)

    JP1/AJS3-Manager-installation-folder\conf\jp1ajs_dbmd.conf

    JP1/AJS3-Manager-installation-folder\conf\jp1ajs_dbmd.conf.v9standard.model

    JP1/AJS3 extended startup process definition file (database management)

    JP1/AJS3-Manager-installation-folder\conf\jp1ajs_dbmd_0700.conf

    JP1/AJS3-Manager-installation-folder\conf\jp1ajs_dbmd_0700.conf.v9standard.model

    In UNIX:

    File type

    File name

    Model file

    JP1/AJS3 startup process definition file (database management)

    /etc/opt/jp1ajs2/conf/jp1ajs_dbmd.conf

    /etc/opt/jp1ajs2/conf/jp1ajs_dbmd.conf.v9standard.model

    JP1/AJS3 extended startup process definition file (database management)

    /etc/opt/jp1ajs2/conf/jp1ajs_dbmd_0700.conf

    /etc/opt/jp1ajs2/conf/jp1ajs_dbmd_0700.conf.v9standard.model

  5. Change the setting in the JP1/AJS3 extended startup process definition file used for system management.

    Use an editor to open the following file, and then change the underlined value in the line under Before the change. If the underlined value is already the same as the value after the change, you do not need to change it.

    In Windows:

    JP1/AJS3 extended startup process definition file (system management)

    JP1/AJS3-Manager-installation-folder\conf\jp1ajs_service_0700.conf

    Before the change

    jajs_dbmd|jajs_dbmd.exe||1|3|3|21600|0|2||1|||||||

    After the change

    jajs_dbmd|jajs_dbmd.exe||0|3|3|21600|0|2||1|||||||

    In UNIX:

    JP1/AJS3 extended startup process definition file (system management)

    /etc/opt/jp1ajs2/conf/jp1ajs_service_0700.conf

    Before the change

    jajs_dbmd|jajs_dbmd||1|3|3|21600|0|2||1|||||||

    After the change

    jajs_dbmd|jajs_dbmd||0|3|3|21600|0|2||1|||||||

(8) Uninstalling an embedded database

For details about uninstalling an embedded database, see 6.1.1(3) Uninstalling an unnecessary database environment.