23.5.1 Advanced setting up an embedded database (on the primary node)
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 on the primary node in a cluster configuration.
- Organization of this subsection
(1) Installing an embedded database
To install an embedded database, you must perform the procedure described in 23.4.1(1) Installing an embedded database. If you plan to install the embedded database on the primary node in a cluster configuration, read the following notes before starting the installation.
- Cautionary notes:
-
-
When you install the embedded database, install it on the local disk of the primary node. Specify the same drive name and the same folder name for both the primary and secondary nodes.
-
If you create a physical host and multiple logical hosts on the same machine and use different embedded databases, specify unique setup identifiers to avoid duplication conflicts.
-
Also check the detailed information about installation. For details about installation, see 23.4.1(1) Installing an embedded database.
(2) Setting up the embedded database environment
To set up the embedded database environment:
-
Stop services.
Stop all services that access the scheduler database. Such services include the JP1/AJS3 on the physical host and all logical hosts.
-
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
-
Execute a command 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 of the embedded database.
-
Creates the embedded database work area.
-
Starts the embedded database system.
Specify an area on a shared disk for the data area and system file area specified in the -d option of the ajsembdbbuild command. Specify an area on the local disk for the embedded database work area specified in the -ld option.
-
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.
- Supplementary note:
-
You cannot set up an environment that duplexes the system file, but does not use the system log (the combination of items in Table 23-2 and Table 23-3 is 8-A, 10-A, or 12-A).
- Cautionary notes:
-
-
In the hosts file or in the DNS, you must register the names of both the primary node physical and logical hosts on which an embedded database environment is set up.
-
A host name registered in the jp1hosts or jp1hosts2 definition file cannot be used as the name of a host on which an embedded database environment will be set up.
-
Do not use an alias for the name of a host on which an embedded database environment will be set up.
-
To configure an embedded-database environment on a host, set the host name by using 1 to 63 bytes for a physical host or by using 1 to 32 bytes for a logical host.
-
Examples of executing the command ajsembdbbuild when setting up a large-scale embedded database environment are shown in subsections (a) and (b) below. The examples also provide the combination of item numbers shown in Table 23-2 and Table 23-3.
(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: l:\EmbDB\RDArea
-
System file area creation directory 1: m:\EmbDB\SYSArea1
-
System file area creation directory 2: n:\EmbDB\SYSArea2
-
Unload log file creation directory: o:\EmbDB\Unload_Log
-
Embedded database work area directory: p:\EmbDB\WorkArea
-
Embedded database installation directory: c:\Program Files#1\HITACHI\JP1AJS2\embdb\_JFA
-
Scheduler service name: AJSROOT4
-
Embedded database port number: 22230
-
Embedded database setup identifier: _JFA
-
Physical host name of the primary node: physical_host
-
Logical host name: logical_host
-
If the system files are not duplicated and the system log is not used#2 (combination 11-A in Table 23-2 and Table 23-3):
ajsembdbbuild -l -d "l:\EmbDB\RDArea,m:\EmbDB\SYSArea1" -ld p:\EmbDB\WorkArea -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JFA" -p 22230 -id _JFA -r -mh logical_host -eh physical_host
-
If the system files are not duplicated and unloading is used (combination 11-B in Table 23-2 and Table 23-3):
ajsembdbbuild -l -d "l:\EmbDB\RDArea,m:\EmbDB\SYSArea1" -ld p:\EmbDB\WorkArea -bs -bl o:\EmbDB\Unload_Log -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JFA" -p 22230 -id _JFA -r -mh logical_host -eh physical_host
-
If the system files are duplicated and unloading is used (combination 12-B in Table 23-2 and Table 23-3):
ajsembdbbuild -l -d "l:\EmbDB\RDArea,m:\EmbDB\SYSArea1,n:\EmbDB\SYSArea2" -ld p:\EmbDB\WorkArea -br -bl o:\EmbDB\Unload_Log -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JFA" -p 22230 -id _JFA -r -mh logical_host -eh physical_host
- #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_JFA
-
Embedded database work area directory: /WorkArea_JFA
-
Embedded database practical directory:/opt/jp1ajs2/embdb/_JFA
-
Scheduler service name: AJSROOT4
-
Embedded database port number: 22230
-
Embedded database setup identifier:_JFA
-
Physical host name of the primary node: physical_host
-
Logical host name: logical_host
-
Data area creation directory: /share1/RDArea_JFA
-
System area creation directory 1: /share2/SYSArea_JFA
-
System area creation directory 2: /share3/SYSArea_JFA
-
If the system files are not duplicated and the system log is not used# (combination 11-A in Table 23-2 and Table 23-3):
ajsembdbbuild -l -d "/share1/RDArea_JFA,/share2/SYSArea_JFA" -ld /WorkArea_JFA -i /opt/jp1ajs2/embdb/_JFA -p 22230 -id _JFA -r -mh logical_host -eh physical_host
-
If the system files are not duplicated and unloading is used (combination 11-B in Table 23-2 and Table 23-3):
ajsembdbbuild -l -d "/share1/RDArea_JFA,/share2/SYSArea_JFA" -ld /WorkArea_JFA -bs -bl /Unload_Log_JFA -i /opt/jp1ajs2/embdb/_JFA -p 22230 -id _JFA -r -mh logical_host -eh physical_host
-
If the system files are duplicated and unloading is used (combination 12-B in Table 23-2 and Table 23-3):
ajsembdbbuild -l -d "/share1/RDArea_JFA,/share2/SYSArea_JFA, /share3/SYSArea_JFA" -ld /WorkArea_JFA -br -bl /Unload_Log_JFA -i /opt/jp1ajs2/embdb/_JFA -p 22230 -id _JFA -r -mh logical_host -eh physical_host
- #:
-
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 (4) Setting up the scheduler database in an embedded database environment or (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. Before you start setup by executing the ajsembdbsetup command, make sure that the scheduler service is set up in the logical host environment.
When executed, the ajsembdbsetup command performs the following operations:
-
Sets the database information of the embedded database (schema and table).
-
Sets the JP1/AJS3 environment setting parameter.
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:
-
Scheduler service name: AJSROOT4
-
Port number of the embedded database: 22230
-
Embedded database setup identifier: _JFA
-
Logical host name: logical_host
ajsembdbsetup -F AJSROOT4 -ru -l -id _JFA -mh logical_host -p 22230
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 set for these environment setting parameters. For details about the parameters, see 20.4 Setting up the scheduler service environment.
-
Environment setting parameter |
Definition |
Setting specified by the ajsembdbsetup command#1 |
---|---|---|
AJSDBTYPE |
Type of database |
EmbedDB |
TABLENAMEPREFIX |
Table name prefix |
Either of the following:
|
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:
|
RDBIPC |
Method for communication with RDB server |
MEMORY |
RDBSENDMEMSIZE |
Send-data memory size for RDB interprocess memory communication |
Either of the following:
|
RDBRECVMEMSIZE |
Receive-data memory size for RDB interprocess memory communication |
Either of the following:
|
DEFLENTYPE |
Number of characters that can be used in a UTF-8 environment |
Either of the following #2, #3
|
ENHANCEDBACKUP |
The setting of the backup enhancement function |
Either of the following:
|
- #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, prepare the following areas separately.
-
Embedded database practical directory
-
Data area
-
System file area
-
Embedded database work area
-
Unload log file creation directory
Prepare the system file area and unload log file creation directory if these are necessary. For the data area and system file area, specify areas on a shared disk.
When you set up the embedded database environment, specify a port number and a setup identifier for the embedded database so that there are no duplication conflicts with other 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.
A setup example is shown below.
This example assumes that the environment described in (2) Setting up the embedded database environment and (3) Environment setting parameter settings is already set up.
■ For Windows
- Environment for the embedded database:
-
The following are the details of the environment for the embedded database to be added:
-
Data area creation directory: q:\EmbDB\RDArea
-
System file area creation directory 1: r:\EmbDB\SYSArea1
-
System file area creation directory 2: s:\EmbDB\SYSArea2
-
Unload log file creation directory: t:\EmbDB\Unload_Log
-
Embedded database work area directory: u:\EmbDB\WorkArea
-
Embedded database installation directory: c:\Program Files#\HITACHI\JP1AJS2\embdb\_JFB
-
Scheduler service name: AJSROOT5
-
Port number of the embedded database: 22231
-
Embedded database setup identifier: _JFB
-
Name of the primary node physical host: physical_host
-
Logical host name: logical_host
- #:
-
For 64-bit versions of Windows, replace Program Files with Program Files (x86).
-
- Specification of the ajsembdbinstl command:
ajsembdbinstl -mh logical_host -s "c:\Program Files\HITACHI\JP1AJS2\tools\AJS3DB" -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JFB" -id _JFB
- Specification of the ajsembdbbuild command:
ajsembdbbuild -l -d "q:\EmbDB\RDArea,r:\EmbDB\SYSArea1,s:\EmbDB\SYSArea2" -ld u:\EmbDB\WorkArea -br -bl t:\EmbDB\Unload_Log -i "c:\Program Files\HITACHI\JP1AJS2\embdb\_JFB" -p 22231 -id _JFB -r -mh logical_host -eh physical_host
- Specification of the ajsembdbsetup command:
ajsembdbsetup -F AJSROOT5 -ru l -id _JFB -p 22231 -mh logical_host
■ For UNIX
- Environment for the embedded database:
-
The following are the details of the environment for the embedded database to be added:
-
Data area creation directory: /share4/RDArea_JFB
-
System file area creation directory 1:/share5/SYSArea_JFB
-
System file area creation directory 2:/share6/SYSArea_JFB
-
Unload log file creation directory: /Unload_Log_JFB
-
Embedded database work area directory: /WorkArea_JFB
-
Embedded database practical directory: /opt/jp1ajs2/embdb/_JFB
-
Scheduler service name: AJSROOT5
-
Port number of the embedded database: 22231
-
Embedded database setup identifier: _JFB
-
Name of the primary node physical host: physical_host
-
Logical host name: logical_host
-
- Specification of the ajsembdbinstl command:
ajsembdbinstl -mh logical_host -s /opt/jp1ajs2/tools/AJS3DB -i /opt/jp1ajs2/embdb/_JFB -id _JFB
- Specification of the ajsembdbbuild command:
ajsembdbbuild -l -d "/share4/RDArea_JFB,/share5/SYSArea_JFB, /share6/SYSArea_JFB" -ld /WorkArea_JFB -br -bl /Unload_Log_JFB -i /opt/jp1ajs2/embdb/_JFB -p 22231 -id _JFB -r -mh logical_host -eh physical_host
- Specification of the ajsembdbsetup command:
ajsembdbsetup -F AJSROOT5 -ru l -id _JFB -p 22231 -mh logical_host
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. Note that the example assumes that the following settings are specified:
-
Scheduler service name: AJSROOT6
-
Table name prefix: AJS2
-
Port number of the embedded database: 22230
-
Embedded database setup identifier: _JFA
-
Logical host name: logical_host
ajsembdbsetup -F AJSROOT6 -tp AJS2 -ru l -id _JFA -mh logical_host -p 22230
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 are 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 are set up, you cannot use the ajsembdbbackup command to back up only 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.
-
You cannot set up both the scheduler database for the logical host and the scheduler database for the physical host in one environment database environment.
-
(6) Setting up an embedded database again
For details about setting up the embedded database again, see 23.4.1(6) Setting up an embedded database again.
In Windows, make sure that JP1/AJS3 Database _JFn# has stopped before you start the JP1/AJS3 for the first time after the embedded database has been set up again. For details, see 8.2.6 Registering the JP1/AJS3 service in the cluster software.
- #
-
_JFn is the embedded database setup identifier used by JP1/AJS3 services on a logical host.
(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:
-
Stop the target JP1/AJS3 service.
-
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.
-
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 = MANUAL1#
- #
-
If you changed the system common definition file in JP1/AJS3 - Manager version 9 or earlier, use that value rather than MANUAL1.
-
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)
shared-folder\jp1ajs2\conf\jp1ajs_dbmd.conf
JP1/AJS3-Manager-installation-folder\conf\jp1ajs_dbmd.conf.v9standard.model
JP1/AJS3 extended startup process definition file (database management)
shared-folder\jp1ajs2\conf\jp1ajs_dbmd_0700.conf
JP1/AJS3-Manager-installation-folder\conf\jp1ajs_dbmd_0700.conf.v9standard.cluster.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.cluster.model
-
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)
shared-folder\jp1ajs2\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)
shared-directory/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.