ajsembdboplog
- Organization of this page
Format
ajsembdboplog [-s|-r|-t| -g system-log-file-group-name -o output-destination-file-name [-f]|-w] [-id embedded-database-setup-ID]
Format 1 (for monitoring the status of the automatic log unload functionality)
ajsembdboplog -s [-id embedded-database-setup-ID]
Format 2 (for restarting the automatic log unload functionality)
ajsembdboplog -r [-id embedded-database-setup-ID]
Format 3 (for stopping the automatic log unload functionality)
ajsembdboplog -t [-id embedded-database-setup-ID]
Format 4 (for unloading the system log file)
ajsembdboplog -g system-log-file-group-name -o output-destination-file-name [-f] [-id embedded-database-setup-ID]
Format 5 (for swap the system log file)
ajsembdboplog -w [-id embedded-database-setup-ID]
Description
Allows you to perform the following for the system log:
-
Control the automatic log unload functionality.
-
Unload the specified system log file group to the output destination file and place the system log file group in the unloaded status.
-
Swap the system log file (group) that is currently used as the output destination.
When you specify the -s, -r,-t, and -w options, you can execute this command only when the embedded database is running. In other cases, you can execute the command regardless of the operating status of the embedded database.
You can execute the command regardless of the operating status of JP1/AJS3.
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
-g system-log-file-group-name
Specify the group name of the system log file to be unloaded.
To check the system log file group name, execute the -l option of the ajsembdbstatus command.
-o output-destination-file-name
Specify the name of the unload log file that is the output destination.
Use the absolute path to specify the file 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.
The size of the directory that stores the unload log output file differs depending on the scale that is specified by using the ajsembdbbuild command. Note that if the system log auto-increment function is used, the space incremented by the function is also required in addition to the space shown in the following table.
ajsembdbbuild option |
Required free space |
---|---|
-l (large-scale model) |
About 1,200 MB |
-m (medium-scale model) |
About 230 MB |
-s (small-scale model) |
About 30 MB |
In an embedded database environment set up by using the jajs_setup or jajs_setup_cluster command, the system log auto-increment function is used for the small-scale model (specified by the -s option of the ajsembdbbuild command).
In an embedded database environment set up by using the jajs_migrate command, the system log auto-increment function is used for the scale model specified for the -s option of the jajs_migrate command. If the -s option of the jajs_migrate command is omitted, s (small-scale model) is assumed.
If the system log file to be unloaded is a new system log file that is added by using the ajsembdbaddlog command, you need the free space of the size specified in the -s option of the ajsembdbaddlog command. Note that if the system log auto-increment function is used, the space incremented by the function is also required in addition to the space shown in the above table.
Each time you unload the system log file, you need the free space described above.
-f
Specify this option when you forcibly unload the system log file. When you specify this option, you can unload the current system log file group or a system log file group that has already been unloaded. However, the status of the system log file group does not change.
You use this option when you need to run the embedded database by using the unload log file and the backup of the embedded database. If an error occurs in the embedded database, the unload log immediately before the error might not be output. In that case, specify the -f option to acquire the unload log file. However, if a problem occurred in the system log file of the embedded database, the command might fail and you might not be able to acquire the unload log file.
-s
Specify this option to display the operating status of the automatic log unload functionality.
-r
Specify this option to restart the automatic log unload functionality.
Immediately after the restart, the directory in which the unload log file is created inherits the information of the previous operation.
When you specify this option the command fails if the automatic log unload functionality has already been started.
-t
Specify this option to stop the automatic log unload functionality.
This option cancels the unload processing if there is a system log file being unloaded. The unload log file that is output at this time is incomplete and cannot be used for restoration.
When you specify this option the command fails if the automatic log unload functionality has already been stopped.
-w
Specify this option if you want to swap the system log file (group) that is currently used as the output destination.
-id embedded-database-setup-ID
Specify the setup identifier that identifies the embedded database in the _JFn format (n: 0-9 or A-Z). The value specified in this argument must be the same as the value specified in the -id option of the ajsembdbbuild command.
If you want to operate an embedded database created by using the jajs_setup, jajs_setup_cluster, and jajs_migrate commands, use the ajsembdbidlist command to check the setup identifier of the embedded database. For details on the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup.
If you omit this option, the system assumes _JF0.
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.
-
If you specify the -r or -t option in the ajsembdboplog command, you need to enable the automatic log unload functionality for the embedded database before you execute the command. If you specify the -r or -t option in ajsembdboplog in an environment in which the automatic log unload functionality is not enabled, an error occurs.
-
When the unload log file and the backup of the embedded database are used to restore the embedded database, stopping the automatic log unload functionality while the embedded database is being restarted results in an incomplete restoration. In this case, JP1/AJS3 restores the embedded database only up to the unload log that is output to the unload log file before the automatic log unload functionality is stopped. If you have stopped the automatic log unload functionality, you need to re-acquire the backup of the embedded database when you restart the automatic log unload functionality.
-
When the unload log file and the backup of the embedded database are used to restore the embedded database, stopping the automatic log unload functionality while the embedded database is running the subsequent system log file groups waiting to be unloaded.
If you continue using the embedded database in this state, all the system log file groups eventually wait to be unloaded and the embedded database becomes unavailable.
To prevent this problem from occurring, you might want to stop the automatic log unload functionality. In this case, periodically execute the ajsembdbstatus command with the -l option specified to check the status of the system log file group, and then execute the ajsembdboplog command with the -g option specified to unload the system log file group.
-
Do not execute this command more than once in quick succession. If you do so, the following problems might occur:
-
The message output is invalid. For example, an invalid message is output or a message that should be output is not output.
-
The command results in an error.
-
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. |
Confirm that the embedded database is running, and then re-execute the command. You can confirm that the embedded database is running by executing the ajsembdbstatus command with the -s ust option specified. |
KAVS2104-E |
The embedded database is not set up. |
Set up the embedded database and then re-execute the command. |
KAVS2105-E |
The specified system log file group does not exist. |
Check the system log file group name and re-execute the command. |
KAVS2106-E |
Unloading failed. |
Execute the ajsembdbstatus command with the -l option specified to check whether the specified system log file group can be unloaded. If the system log file group can be unloaded, wait a while 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. |
Output example
The following shows an output example of checking the operating status of the automatic log unload functionality.
ajsembdboplog -s -id _JF0 HOSTNAME : 127.0.0.1 (180252) SERVER_NAME:ajs2 AUTO_LOG_UNLOAD NOW_UNLOAD_LOG_GROUP CREATE_DIR ACTIVE **** K:/logback CURRENT LOG GENERATION INFO. LOG_GROUP GEN_NO. SERVER_RUN_ID RUN_ID UNLOAD_FILE_NAME log1 1 43c4ad0d 43c4acf3 ajs2_43c4ad0d0001_log1
- HOSTNAME
-
127.0.0.1 is displayed.
The item in parentheses is the hour, minutes, and seconds (format: HHMMSS) of the time when the ajsembdboplog command is executed.
- Cautionary note
-
If any of the conditions below is met, the host name of the embedded database installation directory is output by using no more than 32 characters. In a cluster configuration, the first host name that is set as the active server is output.
-
When JP1/AJS3 - Manager for Windows version 09-50 or earlier is used and the embedded database has been built on a logical host
-
When JP1/AJS3 - Manager for UNIX version 09-50 or earlier is used
-
When JP1/AJS3 - Manager version 09-50 or earlier is updated to version 10-00 or later, and IPv6 has not been set up
-
- SERVER_NAME
-
Indicates the identifier of the embedded database with up to four characters. For JP1/AJS3, this identifier is fixed to ajs2.
- AUTO_LOG_UNLOAD
-
Indicates the operating status of the automatic log unload functionality.
ACTIVE: The feature is operating.
STOP: The feature is stopped.
-: The automatic log unload functionality is unavailable.
- NOW_UNLOAD_LOG_GROUP
-
Indicates the log file group name of the system log file being unloaded.
**** is output if there is no system log file being unloaded.
- CREATE_DIR
-
Indicates the name of the directory in which the unload log file being used is created.
- LOG_GROUP
-
Indicates the log file group name of the system log file of the current generation.
- Gen No.
-
Indicates the generation number of the log with a hexadecimal number of up to eight.
- SERVER_RUN_ID
-
Indicates the information used by the system.
- RUN_ID
-
Indicates the information used by the system.
- UNLOAD_FILE_NAME
-
Indicates the name of the file that is created when the log of the current generation is automatically unloaded.