D.2 Setting up an embedded database (on the primary node)
This section 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) Tasks required before installing the embedded database
Review the tasks required before installing the embedded database. For details about these tasks, see C.2(1) Tasks required before installing the embedded database.
(2) Installing an embedded database
To install an embedded database, you must perform the procedure described in C.2(2) 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 C.2(2) Installing an embedded database.
(3) 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, and JP1/AJS3 Console Agent services 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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
- 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 C-3 and Table C-4 is 14-A, 16-A, 18-A, 20-A, 22-A, or 24-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.
-
The maximum length of the name of a host on which an embedded database can operate is 32 bytes. Therefore, make sure that the name of a primary node physical or logical host on which an embedded database is set up is 1 to 32 bytes.
-
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 C-3 and Table C-4.
(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#\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 (combination 21-A in Table C-3 and Table C-4):
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 21-B in Table C-3 and Table C-4):
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 22-B in Table C-3 and Table C-4):
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
- #:
-
For 64-bit versions of Windows, replace Program Files with Program Files (x86).
(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
The following table shows the data area creation directory and system file area creation directory that are used in the specification example.
Type of area |
Type of file |
|
---|---|---|
Normal file |
RAW file |
|
Data area creation directory |
/share1/RDArea_JFA |
/dev/vgshare1/rdb_JFA |
System file area creation directory 1 |
/share2/SYSArea_JFA |
/dev/vgshare2/rsys_JFA |
System file area creation directory 2 |
/share3/SYSArea_JFA |
/dev/vgshare3/rsys_JFA |
-
If the system files are not duplicated and the system log is not used
Creating the data area and system file area in a normal file (combination 21-A in Table C-3 and Table C-4):
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
Creating the data area and system file area in a RAW file (combination 23-A in Table C-3 and Table C-4):
ajsembdbbuild -l -a "ajssys01=/dev/vgshare1/rdb_JFA, ajssys11=/dev/vgshare2/rsys_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
Creating the data area and system file area in a normal file (combination 21-B in Table C-3 and Table C-4):
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
Creating the data area and system file area in a RAW file (combination 23-B in Table C-3 and Table C-4):
ajsembdbbuild -l -a "ajssys01=/dev/vgshare1/rdb_JFA, ajssys11=/dev/vgshare2/rsys_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
Creating the data area and system file area in a normal file (combination 22-B in Table C-3 and Table C-4):
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
Creating the data area and system file area in a RAW file (combination 24-B in Table C-3 and Table C-4):
ajsembdbbuild -l -a "ajssys01=/dev/vgshare1/rdb_JFA, ajssys11=/dev/vgshare2/rsys_JFA, ajssys17=/dev/vgshare3/rsys_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
(4) Environment setting parameter settings
When you change the number of characters that can be specified for such as unit name in a UTF-8 environment in UNIX, you need to specify sjis for the -e option of the ajsembdbsetup command. In Solaris, if you execute the jajs_setup command or the jajs_setup_cluster command with the -S option specified, EUC is set as the AJSCHARCODE environment setting parameter. Therefore, before executing the ajsembdbsetup command, change the environment setting parameter value to UTF-8. In AIX or HP-UX, if the command jajs_setup or jajs_setup_cluster is executed with the -S option specified, the environment setting parameter AJSCHARCODE is set to SJIS. For this reason, before executing the command ajsembdbsetup, change the value of the 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).
(5) 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
- Supplementary note:
-
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 2.2 Setting up the scheduler service environment in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 2.
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 |
Either of the following:
|
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
|
- #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.
(6) 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 D.2(3) Setting up the embedded database environment and D.2(4) 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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
(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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
- 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.
-
(7) Setting up an embedded database again
For details about setting up the embedded database again, see C.2(7) 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.4 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.
(8) 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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
-
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|||||||
(9) Uninstalling an embedded database
For details about uninstalling an embedded database, see 6.1.1(3) Uninstalling an unnecessary database environment.