ajsembdbsetup
- Organization of this page
Format
ajsembdbsetup [-mh logical-host-name] [-F service-name] [-p port-number] [-m [-s send-buffer-size] [-r receive-buffer-size]] [-ct maximum-wait-time] [-tp table-name-prefix] [-c] [-ru { l | m | s }] [-id setup-identifier] [-convert] [-del] [-e {byte | sjis}] [-b]
Description
The ajsembdbsetup command sets up an embedded database environment in which the database for the scheduler service and agent management can operate.
You can execute this command only when the embedded database is operating.
Execution privileges
In Windows: Administrators privileges
In UNIX: Superuser privileges
Storage directory
- In Windows:
-
JP1/AJS3 - Manager-installation-folder\tools\
- In UNIX:
-
/opt/jp1ajs2/tools/
Arguments
-mh logical-host-name
Specify the name of the JP1 logical host to be processed. You can specify a character string of 1 to 32 bytes.
If environment variable JP1_HOSTNAME is set when this option is omitted, the system assumes the logical host name specified in the environment variable. If JP1_HOSTNAME is not specified, the system assumes the physical host.
-F service-name
Specify the name of the scheduler service to be processed.
If environment variable AJSCONF is set when this option is omitted, the system assumes the service name specified in the environment variable. If AJSCONF is not specified, the system assumes the default scheduler service.
-p port-number
Specify a decimal number as the port number used for connection to the embedded database. Make sure that the port number you specify in this option is the port number specified in the -p option when the ajsembdbbuild command was executed.
If you omit this option, the system assumes 22220.
This communication port is set in the RDBPORT parameter for the configuration definition.
You can specify a value from 5001 to 65535.
-m [-s send-buffer-size] [-r receive-buffer-size]
Specify the sizes of send and receive buffers that are used for the inter-process memory communication function of the embedded database.
The function specified here is set in the RDBIPC, RDBSENDMEMSIZE, and RDBRECVMEMSIZE parameters of the configuration definition.
-
-s
Specifies the send buffer size with a decimal number (unit: kilobytes).
-
-r
Specifies the receive buffer size with a decimal number (unit: kilobytes).
For the -s and -r options, you can specify a value from 4 to 2,097,152.
If you omit the -s or -r option, the system assumes the standard embedded database values for operations.
The optimal values for JP1/AJS3 are: send buffers size =100 and receive buffer size = 1600.
If you omit the -m option, the system uses the inter-process memory communication function, and assumes send buffer size = 100 and receive buffer size = 1600 regardless of the -s and -r options that you specify.
-ct maximum-wait-time
This option takes effect if the RDB connection wait function is used. Specify a value from 0 to 60 (in minutes) as the maximum wait time for connection to the RDB.
If you omit this option, the system assumes 1.
Specifying a value of 0 disables the RDB connection wait function.
If you specify a value outside the 0-60 range in this option, the invalid value is set in the configuration definition. As a result, the following error message might be output when JP1/AJS3 starts: KAVS1003-E Invalid specification in configuration definition. (item-name). In addition, the KAVA0334-E error message might be output while the ajsembdbsetup command is being executed.
-tp table-name-prefix
Specify the table name prefix of the JP1/AJS3 scheduler database by using no more than 4 bytes of half-width alphanumeric characters. Use uppercase characters to specify alphabetic characters.
If you omit this option, the system assumes AJS1.
In the configuration definition, the TABLENAMEPREFIX parameter settings are modified.
-c
Specify this option if you want to reset the scheduler services after a table creation error occurs, despite schema creation ending successfully.
-ru { l | m | s }
Specify this option to use the free area re-use function. When you specify -ru together with l, m, or s, you can specify the re-use start point.
When you omit this option, the system assumes -ru l.
Specify the re-use start point of the free area re-use function after -ru option. Free area is re-used when the usage rate of the database (table) area reaches the re-use start point specified in this option.
l, m, and s correspond to the large database model, medium database model, and small database model of ajsembdbbuild command, respectively. Specify the option that matches the size of the database model specified in ajsembdbbuild command.
The re-use start point of the free area re-use function for the database area is set as follows, for each table.
Table name |
Re-use start point of the free area re-use function for each table |
---|---|
AJS1UNIT |
6% of the segments of the entire AJS2DATA database area (Specify 18 when specifying s, 183 when specifying m, and 957 when specifying l.) |
AJS1ARROW |
|
AJS1BODY |
|
AJSS1CH |
|
AJS1CAL |
|
AJS1PERF |
|
AJS1ENTRY |
|
AJS1GEN |
|
AJS1STAT |
16% of the segments of the entire AJS2DATA database area (Specify 48 when specifying s, 489 when specifying m, and 2553 when specifying l.) |
AJS1RELS |
6% of the segments of the entire AJS2DATA database area (Specify 18 when specifying s, 183 when specifying m, and 957 when specifying l.) |
AJS1ID |
|
AJSAGTEXECCNT |
1% of the segments of the entire AJS2DATA database area (Specify 3 when specifying s, 30 when specifying m, and 159 when specifying l.) |
AJSEXECAGT |
|
AJSEXECAGTGRP |
|
AJSLINKAGT |
|
AJS1JINF# |
70% of the segments of the entire AJS2DATA2 database area (Specify 70 when s, m, or l is specified.) |
- #:
-
This table is created only if the backup enhancement function is enabled.
- Note
-
The above table names are used when the standard table prefix (AJS) is used.
The total number of area segments in the large, medium, and small database models of ajsembdbbuild command are as follows.
Database area name |
Small |
Medium |
Large |
---|---|---|---|
Data area AJS2DATA |
300 |
3,060 |
15,960 |
Data area AJS2DATA2# |
100 |
100 |
100 |
- #:
-
This area is only created if the backup enhancement function is enabled.
-id setup-identifier
Use four characters, _JFn (n is from 0 to 9 or from A to Z), to specify the setup identifier for identifying the embedded database. Specify the value specified in the -id option of the ajsembdbbuild command.
If you omit this option, the system assumes _JF0.
-convert
Specify this option if you want to perform advanced setup after JP1/AJS2 - Manager has been upgraded to JP1/AJS3 - Manager.
-del
This option is specified to restore processing if an error occurs during advance setup performed by specifying the -convert option.
Before you execute the command with the -del option, make sure that the option settings that were specified when the error occurred are also specified. If you specify different option settings, restoration processing might not be performed normally.
This option is also specified when the database is set up to allow the same number of characters to be specified for items such as a unit name in both Shift-JIS and UTF-8 environments. In this case, this option deletes the database that has already been set up.
If you execute the ajsembdbsetup command with the -convert, -p, and -tp options omitted but the -del option specified, the value set when the scheduler service was built is assumed for the -p and -tp options.
-e {byte|sjis}
Specifies for the database of the specified scheduler service whether the same number of characters can be specified for items such as a unit name in both Shift-JIS and UTF-8 environments. If you omit this option, the system assumes byte.
If you omit this option in Linux, byte is specified for the DEFLENTYPE environment setting parameter. If you omit this option in AIX, HP-UX, or Solaris, the value of the DEFLENTYPE environment setting parameter does not change.
You cannot specify this option with the -convert or -del option. If you do so, an error occurs.
In addition, if a value other than UTF-8 is specified for the AJSCHARCODE environment setting parameter for the scheduler service specified in the -F option, an error occurs and the KAVS1516-E message is output.
Note that this option can be specified in UNIX, and cannot be specified in Windows.
-
byte
The database is set up so that the number of characters specifiable in a UTF-8 environment becomes the number of characters specified after conversion in UTF-8. If this option is specified, the number of characters specifiable for items such as a unit name in a Shift-JIS environment and a UTF-8 environment will not be the same.
If you execute the command with this option specified, byte is specified for the DEFLENTYPE environment setting parameter.
-
sjis
The database is set up so that the number of characters specifiable in a UTF-8 environment is converted to the number of characters specifiable in a Shift-JIS environment. If this option is specified, the number of characters that can be used in the following definition items for a unit in a UTF-8 environment is the same as that in a Shift-JIS environment:
-
Unit name in the detailed unit definition
-
Comment in the detailed unit definition
-
Exclusive jobnet in the schedule settings
Before setting up the database with this option specified, make sure that the database of the specified scheduler service has not been set up yet. If the database has already been set up, executing the command will result in an error.
If you execute the command with this option specified, sjis is specified for the DEFLENTYPE environment setting parameter.
-
-b
This option is specified to set up the database for the backup enhancement function.
Specify this option if the backup enhancement function is enabled. If you do not specify this option, an error occurs. Do not specify this option if the backup enhancement function is disabled. If you do so, an error occurs.
You can check the setting of the backup enhancement function by using the ajsembdbstatus command. For details about the ajsembdbstatus command, see ajsembdbstatus in 3. Commands Used for Normal Operations.
You cannot specify this option with the -convert or -del option. If you do so, an error occurs.
Notes
-
Before executing ajsembdbsetup command, stop all the JP1/AJS3 services, including the logical host in the JP1/AJS3 - Manager host. Note that ajsembdbsetup command may terminate normally even if these services are not stopped. Also, the JP1/AJS3 logical host must be reachable using the IP address resolved from the logical host name specified in the -mh option.
-
The ajsembdbsetup command is incorporated in a script. For this reason, specifying a long character string or an invalid character string or value may result in an unexpected error. In the options, specify the character strings and numeric values defined in the DBMS and JP1/AJS3.
-
Even if an error that occurred is in a configuration definition not necessary for scheduler database setup, the following error message is output: KAVS1003-E Invalid specification in configuration definition. (item-name). Setup is complete upon the normal termination of ajsembdbsetup command. You do not have to perform setup again even if this message is output repeatedly. After terminating ajsembdbsetup command, correct any configuration definition errors as prompted by the error message KAVS1003-E.
-
To create an environment by changing the character encoding in UNIX, set the LANG environment variable correctly.
-
If an error occurs in embedded database access when the ajsembdbsetup command is executed, embedded database connection error information is output to pderr1.trc and pderr2.trc files in the work directory for the ajsembdbsetup command. If you re-execute the command and the command terminates normally, delete these files.
-
Do not execute ajsembdbsetup command repeatedly in quick succession. If you do so, the following problems might occur:
-
The scheduler database becomes invalid and can no longer be used.
-
The ajsembdbsetup command results in an error.
-
The configuration definition information becomes invalid, disabling further operation of JP1/AJS3.
-
-
If an error occurs when the ajsembdbsetup command with the -e sjis option specified is executed, re-execute the command with the -c option specified. If you re-execute the command with the -c option specified but without also specifying the -e sjis option, an error occurs and the KAVS0980-E message is output.
-
If an error occurs when the ajsembdbsetup command without the -e sjis option specified is executed, re-execute the command with the -c option specified. If you re-execute the command by specifying both the-c and -e sjis options, an error occurs and the KAVS0980-E message is output.
Actions to be taken if an error occurs
An error may occur during ajsembdbsetup command execution. If an error occurs, correct the cause of the error according to the table below, and then re-execute this script.
Message ID |
Cause |
Action taken |
---|---|---|
Invalid value specified in -ct option. |
An invalid argument is specified in the argument of the -ct option. |
Specify an integer, ranging from 0 to 60, in the argument of the -ct option. |
KAVS0178-E |
The table is already created. |
Make sure that the value of the -tp option is different from a table name prefix that has already been registered. Alternatively, delete the existing tables by executing the command with the same option settings, in addition to the -del option, specified, and then re-execute the command. |
KAVS0190-E |
The specified scheduler service is not defined in the host. |
Specify an existing scheduler service name in the -F option. |
KAVS0980-E |
The database table configuration is not compatible. |
In an environment in which the command was executed with the -e sjis option specified, the command was re-executed by specifying the -c option but not specifying the -e sjis option. In an environment in which the command was executed without the -e sjis option specified, the command was re-executed by specifying both the -c and -e sjis options. When re-executing the command, specify the -e option the same way it was specified in the original command. |
KAVS0985-E |
The embedded database server cannot be connected to the database. |
Possible causes for this error are as follows: The embedded database is not started. The port number specified in the -p option does not match the port number of the embedded database. Correct these causes and then re-execute this command. |
KAVS0996-E |
The specified option and value are invalid. |
Correct the specified option and value. |
KAVS1003-E |
The configuration definition includes an invalid specification. |
Correct the value specified in the option and then re-execute this command. |
KAVS2116-E |
The value specified in the option is invalid, or options that cannot be specified together were specified. |
Correct the options and the value specified for the options, and then re-execute this command. |
KAVS8404-E |
The backup enhancement function is disabled. |
Re-execute the command without the -b option specified. You can check the setting of the backup enhancement function by using the ajsembdbstatus command. For details about the ajsembdbstatus command, see ajsembdbstatus in 3. Commands Used for Normal Operations. |
KAVS8409-E |
The backup enhancement function is enabled. |
Re-execute the command with the -b option specified. You can check the setting of the backup enhancement function by using the ajsembdbstatus command. For details about the ajsembdbstatus command, see ajsembdbstatus in 3. Commands Used for Normal Operations. |
KFPA11723-E |
The embedded database is stopped. |
Start the embedded database. |
KFPA11204-E |
There is no table. |
Review the value of the -tp option, and specify a correct table prefix. Then, re-execute the command. |
KFPA11563-E KFPA11732-E |
Because another user is accessing the embedded database, a lock wait timeout occurred. |
Stop all accesses to the embedded database, and then re-execute the command. |
The embedded DB work directory associated with the setup identifier specified by the -id option is invalid. |
The embedded database practical directory associated with the setup identifier specified in the -id option is invalid. |
Specify a correct value for the embedded database practical directory set in the configuration definition and re-execute the script. To check the registered setup identifiers and embedded database practical directories, execute the ajsembdbidlist command. For details on the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup. |
The setup identifier specified with the -id option is not registered. |
The setup identifier specified in the -id option is not registered. |
Specify a setup identifier that is already registered and re-execute the script. To check the registered setup identifiers and embedded database practical directories, execute the ajsembdbidlist command. For details on the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup. |
Failed to register the configuration definition. |
Registering the configuration definition failed. |
If advanced setup has been performed, specify also the -del option to delete the existing tables, and then re-execute the command. |
For details on the messages beginning with KAVS, see 3. Messages beginning with KAVS (Messages about the scheduler and the common processing) in the manual JP1/Automatic Job Management System 3 Messages.
Return values
0 |
Normal end |
Values other than 0 |
Abnormal end |