10.2.2 Terminating the HADB server
To stop the HADB server, execute the adbstop command. This stops the HADB server.
Enter the command as follows:
adbstop#
- #
-
By specifying an option when executing the adbstop command, you can change the HADB server termination mode. For details, see (1) HADB server termination modes and (2) Option specification and normal termination types.
- Important
-
If there are applications or commands connected to the HADB server, executing the adbstop command will not terminate the HADB server.
- Organization of this subsection
(1) HADB server termination modes
The HADB server can be terminated in any of the modes described below. The options you specify in the adbstop command differ depending on the termination mode.
No. |
Termination mode |
Command and option to be executed |
Explanation |
---|---|---|---|
1 |
Normal termination |
adbstop |
This is the normal termination mode. There are four types of normal termination, and the termination process differs depending on the option specified. For details, see (2) Option specification and normal termination types. |
2 |
Forced termination |
adbstop --force |
The HADB server terminates without waiting for any transactions currently being processed to be completed. Once the adbstop --force command is executed, no new connection requests are accepted. The transactions being processed will be the target of recovery processing when the HADB server is restarted. |
3 |
Abnormal termination |
-- |
This is the mode in which the HADB server is terminated by some error. The HADB server terminates without waiting for any transactions being processed to be completed. The transactions being processed will be the target of recovery processing when the HADB server is restarted. |
- Legend:
-
--: There is no command to be executed.
(2) Option specification and normal termination types
The normal termination process differs depending on the option specified for the adbstop command. The table below shows the options that can be specified for the adbstop command and the types of normal termination.
For details about how to specify options for the adbstop command, see adbstop (Terminate the HADB Server) in the manual HADB Command Reference.
No. |
Command and option to be executed |
Explanation |
---|---|---|
1 |
adbstop |
When the adbstop command (with no option specified) is executed, the HADB server terminates if no application program is connected to the HADB server or if no command is being executed.
|
2 |
adbstop --wait connection |
When the adbstop --wait connection command is executed, the HADB server terminates after waiting for the following processes to be completed:
|
3 |
adbstop --wait transaction |
When the adbstop --wait transaction command is executed, the HADB server terminates after waiting for the transactions being processed to finish and the commands being executed to terminate.
|
4 |
adbstop --cancel |
When the adbstop --cancel command is executed, the HADB server terminates, canceling the transactions being processed and the commands being executed.
|
- ■ Termination standby processing
-
Termination standby processing is a status in which the HADB server is waiting for the following processes:
-
Disconnection of connected application programs from the HADB server
-
Termination of commands being executed
-
Completion of transactions being processed
The HADB server enters termination standby processing only when the adbstop --wait connection command and the adbstop --wait transaction command are executed. Termination standby processing has a wait time, which can be specified using the -t option of the adbstop command. If the -t option is omitted, the default wait time is applied.
-
- ■ Wait time in termination standby processing
-
A timeout occurs in any of the following cases: if an application program connected to the HADB server is not disconnected, if a command being executed does not terminate, or if a transaction being processed does not finish within the wait time in termination standby processing. When a timeout occurs, the HADB server does not terminate. In this case, eliminate the cause of the error based on the information in the KFAA91152-E message that was output.
When the wait time in termination standby processing is exceeded (a timeout occurs), the HADB server can once again accept new connection requests and new transaction start requests.
- ■ Checking for termination standby processing
-
You can use the adbls -d srv command to check whether the HADB server is in termination standby processing. If the output item STATUS shows STOPWAIT, the HADB server is in termination standby processing.
If you want to cancel termination standby processing, use the operating system's kill command to terminate the adbstop command process. This cancels termination standby processing.
When termination standby processing is canceled, the HADB server can once again accept new connection requests and new transaction start requests.
For details about the adbls -d srv command, see adbls -d srv (Display the HADB Server Status) in the manual HADB Command Reference.
(3) Checking whether the termination process has been completed
To check whether the HADB server has completed terminating, check the return code of the adbstop command.
-
If the return code is 0
Termination processing ended normally.
-
If the return code is 4
Although termination processing has ended, a warning message was output.
The HADB server has terminated. Check the displayed message or the message output to the message log file, and take the necessary action.
-
If the return code is 8
An error occurred during termination processing of the HADB server and termination processing ended abnormally. Check the displayed message or the message output to the message log file, and take the necessary action.