2.113 pdstop (Terminate HiRDB system, unit, or server)

Organization of this section
(1) Function
(2) Executor
(3) Format
(4) Options
(5) Rules
(6) Notes

(1) Function

The pdstop command terminates a HiRDB system, unit, or server.

(2) Executor

HiRDB administrator

(3) Format

(a) Normal termination
HiRDB single server configuration

pdstop [-d]

HiRDB parallel server configuration

 pdstop [{-x host-name|-u unit-identifier|-s server-name

            |-u unit-identifier -s server-name}] [-d]

(b) Planned termination

pdstop -P[-d]

(c) Forced termination
HiRDB single server configuration

pdstop -f[{-d|-q}]

HiRDB parallel server configuration

 pdstop {-f [{-x host-name|-u unit-identifier|-s server-name

                |-u unit-identifier -s server-name}[-d]]

          |-z[{-d|-q|-c|-s server-name}]}

(d) Termination of HiRDB at the log application site

pdstop -l [-d]

(4) Options

(a) -p

Specifies that the termination is to be by planned termination.

Difference between planned termination and normal termination is as follows:

Connected to HiRDBTransactionNormal terminationPlanned termination
NoNoYY
YesNN
YesNoNY
YesNN
Legend:
Y: Can be executed.
N: Cannot be executed.
(b) -f

Specifies that the termination is to be by forced termination. The target will terminate normally when this option is specified together with the -s option and the specified server name is not for a back-end server on a unit that is using the standby-less system switchover (effects distributed) facility.

(c) {-x host-name|-u unit-identifier|-s server-name}

Specifies the unit or server that is to be terminated. When this option is omitted, the HiRDB system is terminated.

-x host-name ~<identifier> ((1-32))
When a unit is to be terminated, specifies the name of the host containing the unit. The host containing the system manager cannot be specified.
When the standby-less system switchover (effects distributed) facility is used, the command terminates the host and guest BESs on the specified host's unit. If the terminated server was the running system, it is released from acceptable status when viewed from another unit in the HA group.
-u unit-identifier ~<identifier> ((4 characters))
When a unit is to be terminated, specifies the identifier of the unit. The unit identifier of the unit in which the system manager is located cannot be specified.
When the standby-less system switchover (effects distributed) facility is used, the command terminates the host and guest BESs on the specified unit. If the terminated server was the running system, it is released from acceptable status when viewed from another unit in the HA group.
-s server-name ~<identifier> ((1-8))
When a server is to be terminated, specifies the name of the server.
When the standby-less system switchover (effects distributed) facility is used:
When the -u option is omitted, the command terminates the specified servers on all active units in the HA group.
When the -u option is specified, the command terminates the specified server on that unit. If the terminated server was the running system, it is released from acceptable status as viewed from other units in the HA group.
For details about the standby-less system switchover (effects distributed) facility, see the HiRDB Version 9 System Operation Guide.
(d) -z

Specifies that a unit other than the system manager is to be directly logged into and terminated forcibly; this option is specified when the system manager in a HiRDB parallel server configuration terminates abnormally and cannot be restarted.

If the pdstop command with the -z option specified is executed by mistake during HiRDB system startup or normal termination, the unit may terminate abnormally or the command may not be executed.

(e) -d

Specifies that a dump of shared memory is to be output at the time of termination. If the -s option is specified, this option is ignored. The shared memory dump is output to $PDDIR/spool/pdshmdump/shmdump.

(f) -q

If the system switchover facility is used, this option specifies that the specified system is to be terminated forcibly. You can specify this option if use is specified in the pd_ha operand, and the pd_ha_unit operand is also specified in the system definitions.

(g) -c

When the standby-less system switchover (1:1) facility is being used, specifies that the alternate system is to be terminated forcibly. Specify this option in the following cases:

To execute the pdstop -q -c command, directly log onto the host of the alternate system that is to be terminated forcibly (host specified in -x of the pdunit operand in the system definition).

(h) -l

When Real Time SAN Replication based on the log-only synchronous method is used, specifies that HiRDB is to be terminated at the log application site.

Rules
  1. The pdstop -l command can be executed at the log application site only. If the command is executed at the transaction execution site, an error results.
  2. The pdstop -l command results in an error if it is executed while there are any inactive units.

(5) Rules

  1. The pdstop command can be executed only while HiRDB is active.
  2. The pdstop command must be executed on the server machine that contains the single server or utility special unit or the server machine where the system manager is located.
  3. Once the HiRDB system has been started by the pdstart command with the -r option specified, it cannot be terminated in units by specifying the -x option. In this case, either all options must be omitted or the -f option must be specified to terminate the HiRDB system.
  4. If the HiRDB system was started by the pdstart command with the -i option specified and the database initialization utility has been terminated, the -x option can be specified to terminate each unit of the HiRDB system. If the database initialization utility has not been terminated, the HiRDB system cannot be terminated in units by specifying the -x option. In this case, the -f option must be specified to terminate the HiRDB system.
  5. When the -z option is specified, the specified unit is stopped forcibly and any other options that are specified are ignored.
  6. When HiRDB is being terminated by the pdstop or pdstop -P command, pdstop -f -x host-name or pdstop -f -u unit-identifier cannot be used to execute forced termination.
  7. While the pdrplstart or pdrplstop command is executing, do not execute the pdstop command (except when the -f or -z option is specified).
  8. The pdstop command might not be able to terminate normally while an operation command or utility is executing. You can use the pdstop command to execute planned or forced termination.

(6) Notes

  1. The following are the pdstop command's return codes:
    0: Normal termination
    4: Abnormal termination (communication timeout during planned termination)
    8: Abnormal termination (invalid option)
  2. The result of the pdstop command can be checked by the pdls command (with -d svr specified).
  3. Executing the pdstop command (with -f specified) during HiRDB startup or termination processing or during transaction processing may result in abnormal termination of the unit.
  4. If the pdstop command is entered with the -z option specified at a unit other than the system manager during normal operation of the system manager, that unit will be terminated abnormally.
  5. If HiRDB is linked to an OLTP system, OLTP must be terminated before HiRDB is terminated; otherwise, normal or planned termination of OLTP may fail because OLTP cannot process transactions.
  6. If planned termination does not end 15 minutes after the execution of the pdstop -P command because either a utility or a transaction was being executed, a KFPS05072-W message appears, indicating that the planned termination process is taking time. The planned termination process continues after the message.
  7. If you have specified the pd_log_auto_unload_path operand in the system definitions and executed the pdstop command while the automatic log unloading facility is running, you cannot terminate HiRDB until all the system log files have been unloaded. If you want to terminate HiRDB immediately, terminate the automatic log unloading facility using the pdlogatul -t command before executing the pdstop command.
  8. If the system manager unit terminates abnormally due to a failure when the HiRDB parallel server configuration was started by the pdstart -r command, you must terminate all units other than the system manager unit using one of the following methods:
    • Execute the pdstart -R command at the system manager unit.
    • Execute the pdstop -z command at all active units other than the system manager unit.
    For details about handling errors, see Actions to take if an error occurs during a startup using the pdstart -r command in the HiRDB Version 9 System Operation Guide.
  9. If automatic data loading into an audit trail table is underway when normal or planned system termination is to be executed, the command displays the KFPS05719-W message and waits until automatic data loading has been completed.#
    When automatic data loading on the audit trail table is completed, the command displays the KFPS05720-I message and then continues the termination processing. If you want to terminate HiRDB immediately, execute the pdaudatld -t command prior to pdstop in order to terminate the facility for automatically loading audit trail table data. If automatic data loading is already underway, use the pdcancel command to cancel the processing.
  10. If the automatic data loading facility terminates with an error while waiting for completion of automatic data loading on an audit trail table, the command displays the KFPS05721-W message and then continues the termination processing.
  11. If automatic data loading on an audit trail table is underway when the unit is to be terminated normally, a command error might result. If you attempt to terminate normally the unit where the back-end server containing the audit trail table is located or the unit containing the audit trail table on which automatic data loading is underway, the command will display the KFPS05070-E or KFPS05234-E message. If you want to terminate the unit normally, execute the pdaudatld -t command to terminate the facility for automatically loading audit trail table data and then execute the pdstop command.
  12. If automatic data loading on an audit trail table is underway when the server is to be terminated normally, a command error might result. If you attempt to terminate normally the back-end server containing the audit trail table, the command will display the KFPS05071-E or KFPS05235-E message. If you want to terminate the back-end server normally, execute the pdaudatld -t command to terminate the facility for automatically loading audit trail table data and then execute the pdstop command.
  13. If there are in-memory RDAREAs, normal or planned termination of HiRDB cannot be executed. First release the in-memory RDAREAs and then execute normal or planned termination of HiRDB.
    Note that forced termination can be executed even when there are in-memory RDAREAs. In this case, however, the update data in the in-memory data buffers will not be applied to the in-memory RDAREAs.
  14. If the HiRDB system contains XDSs that are being started, are running, or are being terminated, you must first terminate all XDSs in the system and then execute the normal or planned termination of the HiRDB system. While an XDS is being started, is running, or is being terminated, a normal or planned termination of the HiRDB system cannot be executed.
  15. If a unit contains an XDS that is being started, is running, or is being terminated, you must first terminate the XDS and then terminate the corresponding unit normally. The corresponding unit cannot be terminated while an XDS is being started, is running, or is being terminated.
  16. If there are XDSs running in the HiRDB system, you must first terminate all XDSs in the system and then forcibly terminate the HiRDB system. If you attempt to forcibly terminate the HiRDB system while XDSs are running, the XDSs will also be terminated forcibly. When XDSs are terminated forcibly while a memory database is running, data in the memory database will be lost.
  17. If there are XDSs running in a unit, you must first terminate the XDSs and then forcibly terminate the corresponding unit. If you attempt to forcibly terminate the unit while XDSs are running in the unit, the XDSs will also be terminated forcibly. If XDSs are terminated forcibly while a memory database is running, data in the memory database will be lost.
  18. While updatable online reorganization is underway, you cannot specify the pdstop command (normal termination). If executed, the command results in an error. To terminate HiRDB while updatable online reorganization is underway, use the pdstop command for planned or forced termination (pdstop -P or pdstop -f).
  19. When you are using Real Time SAN Replication based on the log-only synchronous method, you can use the pdstop -l or pdstop -f command to terminate HiRDB at the log application site.
#
If the pdstop command is executed to perform normal termination of the system (no option specified), but a UAP or a utility is still running after 15 minutes, the command cancels the termination processing. If the pdstop command is executed to perform planned termination of the system (-p option specified), but a transaction or a utility is still running after 15 minutes, the command displays the KFPS05072-W message and terminates itself with a warning. This 15-minute period does not include the time spent waiting for completion of automatic data loading on an audit trail table.