C.2 Setting up an embedded database
This appendix 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) Tasks required before installing the embedded database
This subsection describes the work that is required before you install the embedded database.
- Note on the embedded database:
-
External client software cannot connect to the embedded database.
(a) For Windows
■ Checking free space on the target disk
Check whether the free space on the target disk is sufficient before you install the embedded database. The embedded database requires about 240 MB of free disk space.
■ Checking the size of virtual memory
To check the size of virtual memory:
-
In the Windows Start menu, choose Control Panel, and then double-click System.
The System Properties dialog box appears.
-
Click the Advanced tab.
-
Click the Settings button of Performance.
The Performance Options window appears.
-
Click the Advanced tab.
-
Click the Change button of Virtual memory.
The following shows the required virtual memory size. To determine the size you actually specify, add the size required by Windows and other programs. If you change the size of the virtual memory, you must restart Windows.
Paging file size = 130 MB
- Cautionary note:
-
-
The size may increase depending on the number of JP1/AJS3 - Views that are connected or the number of scheduler services that are set.
-
Set the required value for the initial size of contiguous area on the same drive that can be used for virtual memory. If a contiguous area cannot be used for virtual memory, the embedded database might terminate abnormally because memory is insufficient.
-
■ Checking the file system
If you install the embedded database on an NTFS file system, do not compress the files under the embedded database practical directory. If you compress this directory, the embedded database will not operate correctly.
(b) For UNIX
■ Checking and changing kernel parameters
You need to estimate the required size for the message queue and semaphores used by the embedded database, and change the kernel parameters accordingly. For details about estimating operating system parameters, see 3.2.5 Estimating the values for kernel parameters in the Job Management Partner 1/Automatic Job Management System 3 System Design (Configuration) Guide.
(2) 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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
- Notes on installation:
-
-
Before you execute the ajsembdbinstl command, make sure that you are a member of the Administrators group. If a user who is not a member of the Administrators group 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).
-
(3) Setting up the embedded database environment
To set up an embedded database environment:
-
Stop all the services.
Stop all the 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 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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
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 C-3 and Table C-4.
- Supplementary note:
-
If the system files are duplicated and the system log is not used (combination 2-A, 4-A, 6-A, 8-A, 10-A or 12-A in Table C-3 and Table C-4), 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.
-
The maximum size of the name of the host on which the embedded database can operate is 32 bytes. Therefore, specify the name of the physical host on which the embedded database can be set up in the range from 1 to 32 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#\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 (combination 9-A in Table C-3 and Table C-4):
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 9-B in Table C-3 and Table C-4):
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 10-B in Table C-3 and Table C-4):
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
- #:
-
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_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
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 |
/RDArea_JF3 |
/dev/rdb_JF3 |
System file area creation directory 1 |
/SYSArea1_JF3 |
/dev/rsys1_JF3 |
System file area creation directory 2 |
/SYSArea2_JF3 |
/dev/rsys2_JF3 |
-
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 9-A in Table C-3 and Table C-4):
ajsembdbbuild -l -d "/RDArea_JF3,/SYSArea1_JF3" -i /opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
Creating the data area and system file area in a RAW file (combination 11-A in Table C-3 and Table C-4):
ajsembdbbuild -l -a "ajssys01=/dev/rdb_JF3,ajssys11=/dev/rsys1_JF3" -d /WorkArea_JF3 -i /opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
-
If the system files are not duplicated and unloading is used
Creating the data area and system file area in a normal file (combination 9-B in Table C-3 and Table C-4):
ajsembdbbuild -l -d "/RDArea_JF3,/SYSArea1_JF3" -bs -bl /Unload_Log_JF3 -i opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
Creating the data area and system file area in a RAW file (combination 11-B in Table C-3 and Table C-4):
ajsembdbbuild -l -a "ajssys01=/dev/rdb_JF3,ajssys11=/dev/rsys1_JF3" -d /WorkArea_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
Creating the data area and system file area in a normal file (combination 10-B in Table C-3 and Table C-4):
ajsembdbbuild -l -d "/RDArea_JF3,/SYSArea1_JF3,/SYSArea2_JF3" -br -bl /Unload_Log_JF3 -i /opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
Creating the data area and system file area in a RAW file (combination 12-B in Table C-3 and Table C-4):
ajsembdbbuild -l -a "ajssys01=/dev/rdb_JF3,ajssys11=/dev/rsys1_JF3, ajssys17=/dev/rsys2_JF3" -d /WorkArea_JF3 -br -bl /Unload_Log_JF3 -i /opt/jp1ajs2/embdb/_JF3 -id _JF3 -p 22223
(4) 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, 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.
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: AJSROOT2
-
Port number of the embedded database: 22223
-
Embedded database setup identifier: _JF3
ajsembdbsetup -F AJSROOT2 -ru -l -id _JF3 -p 22223
- Supplementary note:
-
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 2.2 Setting up the scheduler service environment in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 2.
Table C‒7: 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
One of the following:
-
Physical host name
-
-mh option specification value
-
Setting of the JP1_HOSTNAME environment variable.
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
-
(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, 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 C.2(3) Setting up the embedded database environment and C.2(4) 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 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.
-
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 Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
- 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.
-
(7) Setting up an embedded database again
To set up an embedded database again:
-
Back up the unit definition and execution agent information.
For details about how to perform the backup, see 2.2.2 Backing up the JP1/AJS3 - Manager setup information in the Job Management Partner 1/Automatic Job Management System 3 Administration Guide.
-
Stop all the 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.
-
Use the ajsembdbunset -e command to delete the embedded database environment.
-
If you need to change the embedded database practical directory, uninstall the embedded database, and then reinstall it.
-
Use the ajsembdbbuild command to create an embedded database.
-
Use the ajsembdbsetup command to set up the embedded database.
-
Use the ajsembdbstop command to stop the embedded database.
-
Start the JP1/AJS3 service.
-
Restore the unit definition and execution agent information you backed up in step 1.
See 2.3.3 Recovering the JP1/AJS3 - Manager setup information in the Job Management Partner 1/Automatic Job Management System 3 Administration Guide.
-
Register the required jobnet for execution.
For details about commands used in the above procedure, see 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1 and 2. Commands Used during Setup in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
- 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.
-
(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 = AUTO#
- #
-
If you changed the system common definition file in JP1/AJS3 - Manager version 9 or earlier, use that value rather than AUTO.
-
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
-
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|||||||
(9) Uninstalling an embedded database
For details about uninstalling an embedded database, see 6.1.1(3) Uninstalling an unnecessary database environment.