ajsembdbrorg
- Organization of this page
Format
ajsembdbrorg -k {unld|reld} [-F scheduler-service-name] [-mh logical-host-name] [-agent] -d name-of-directory-where-unload-file-stored
Format 1 (for storing the data in the embedded database in the unload data file)
ajsembdbrorg -k unld [-F scheduler-service-name] [-mh logical-host-name] [-agent] -d name-of-directory-where-unload-file-stored
Format 2 (for restoring the data in the embedded database by using the unload data file)
ajsembdbrorg -k reld [-F scheduler-service-name] [-mh logical-host-name] [-agent] -d name-of-directory-where-unload-file-stored
Description
Obtains and restores the data in the embedded database.
You can execute this command only while the embedded database and all the scheduler services for which the applicable embedded database was created as the scheduler database are not running.
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
-k unld | reld
Specify the type of processing.
-
unld
Specify this option to store the data in the database of the specified scheduler service in the unload data file.
-
reld
Specify this option to restore the data in the database of the specified scheduler service from the unload data file.
-F scheduler-service-name
Specify the name of the target scheduler service.
If you omit this option, the system assumes the default scheduler service name.
Specification of this option is overridden by the -agent option specification.
-mh logical-host-name
Specify the name of the target JP1 logical host.
You can specify a character string of 1 to 32 bytes.
If you omit this option and environment variable JP1_HOSTNAME has been set, the system assumes the value set for JP1_HOSTNAME. If environment variable JP1_HOSTNAME has not been set, the system assumes the physical host name.
-agent
Specify this option if you want to execute the command for the database for the agent management.
Specification of this option overrides the -F option specification.
-d name-of-directory-where-unload-file-stored
Specify the name of the directory that stores the unload file.
Use the absolute path to specify the directory name. If the specified directory name contains a space character, enclose the path in double quotation marks (").
Do not specify a disk on a network drive.
Prepare the directory you are going to specify beforehand. If you specify a non-existent directory, an error occurs.
When you specify unld for the -k option, the unload file is created in the directory specified here.
If the file already exists, a confirmation message asking you whether you want to delete the file appears.
Message to be output: OK to Overwrite the unload file?(y/n):
To delete the file, enter y.
Notes
-
This command is implemented by a script. If you specify an excessively long character string or an invalid character string or value for an option, an unexpected error might occur. You must use the number of characters allowed for a character string or a value in the option as specified in the DBMS and JP1/AJS3 specifications.
-
Before you execute this command, stop all the scheduler services for which the applicable embedded database is created as the scheduler database. In addition, stop all the services that are accessing the embedded database, including the JP1/AJS3 service. If you execute this command without stopping services, you might need to wait for a long time.
-
When you specify unld for the -k option, the directory you specify in the -d option must have the following free space:
ajsembdbbuild option
Required free space
-l (large-scale model)
About 6,700 MB
-m (medium-scale model)
About 1,400 MB
-s (small-scale model)
About 200 MB
Furthermore, if the backup enhancement function is enabled, the following free disk space is required for the directory specified for the -d option.
ajsembdbbuild option
Required free space
-l (large-scale model)
About 7,200 MB
-m (medium-scale model)
About 1,900 MB
-s (small-scale model)
About 700 MB
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.
Note that if the embedded database area is expanded by the ajsembdbaddarea command or the system log auto-increment function, the space incremented by the command or function is also required in addition to the space shown in the above table.
Each time you execute this command, the above free space is required.
-
Before you execute the command with the -k reld option (restoration) specified, make sure that maintenance of the embedded database area has been completed by using the ajsembdbreclaim command.
-
If a failure such as a communication or disk failure occurs during execution of this command, the command might not respond. If the non-responding command cannot be killed manually, you can specify the embedded database system common definition pd_utl_exec_time to kill the command. For details about pd_utl_exec_time, see the system common definition in the 23.1.1 Examining the embedded-database operating environment and operating method in the JP1/Automatic Job Management System 3 Configuration Guide.
-
Do not execute multiple ajsembdbrorg commands with the same scheduler service name set in the -F option for each command.
-
Do not concurrently execute for a single embedded database multiple ajsembdbrorg commands in which the -agent option is specified.
-
The setting of the backup enhancement function must be the same between the environment where data is to be restored by using the -k reld option and the environment where data was stored by using the -k unld option.
For example, data that was stored by using the -k unld option in an environment where the backup enhancement function is enabled cannot be restored by using the -k reld option in an environment where the function is disabled.
Return values
0 |
Normal end |
Values other than 0 |
Abnormal end |
Actions to be taken if an error occurs
If a command error occurs, take the indicated action in the following table.
Message |
Cause |
Action to be taken |
---|---|---|
KAVS0996-E |
The specified option contains an error. |
Check the specification of the option. |
KAVS2101-E |
The embedded database is inactive. |
Start the embedded database and then re-execute the command. |
KAVS2102-E |
The embedded database is being started or stopped. |
Use the -s ust option of the ajsembdbstatus command to check whether the embedded database is running and then re-execute the command. |
KAVS2104-E |
The embedded database is not set up. |
Set up the embedded database and then re-execute the command. |
KAVS2106-E |
Unloading failed. |
Wait a while and then re-execute the command. |
KAVS2107-E |
Reloading failed. |
Specify the correct unload data file and then re-execute the command. |
KAVS2113-E |
The specified directory does not exist. |
Check the argument specified in the -d option and then re-execute the command. |
KAVS2116-E |
The specified option contains an error. |
Check the option output in the message and then re-execute the command. |
KAVS2117-E |
An error occurred during execution of the command. |
Check the message output in the maintenance information. |
KFPL15047-E |
There is no permission for the path specified in the -d option or for the unload log file in the path. |
Check the permissions for the specified path or for the unload log file, and then re-execute the command. If AJS administrators operate the system, make sure that the AJS administrators have the appropriate privileges. |