2.11 pdcancel (Forcibly terminate UAP or utility processing)

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

(1) Function

The pdcancel command forcibly disconnects and terminates the process on HiRDB for processing a specified UAP or utility.

When a process is still active on HiRDB although the corresponding UAP has been terminated due to an error or other problem, this command is used to terminate the process. This command forcibly terminates the single server process or the front-end and back-end server processes on the HiRDB to which the UAP was connected.

The pdcancel command also cancels utility processing that is executing.

(2) Executor

HiRDB administrator

(3) Format

(a) HiRDB single server configuration

pdcancel {-U| -u UAP-identifier [-i process-ID]| -i process-ID -d}

(b) HiRDB parallel server configuration

pdcancel {-x host-name | -X unit-identifier}
         {-U| -u UAP-identifier [-i process-ID]| -i process-ID -d}

(4) Options

(a) UAP
-x host-name ~<identifier> ((1-32))
Specifies the name of the host containing the front-end server to which the corresponding UAP is connected.
The host name can be obtained with the pdls command.
-X unit-identifier ~<identifier> ((4 characters))
Specifies the identifier of the unit containing the front-end server to which the corresponding UAP is connected.
-U
Specifies that all UAPs running on the unit with the specified host name are to be forcibly terminated.
-u UAP-identifier ~<character string> ((1-30))
Specifies the UAP identifier (PDCLTAPNAME) of the client UAP corresponding to the process on HiRDB that is to be forcibly terminated. If more than one UAP with the same identifier is running on the corresponding unit, the -i option must be specified.
-i process-ID~<unsigned integer> ((1-10))
Specifies the process ID of the process that is to be forcibly terminated. When this option is specified together with the -u option, the process ID of a single server or front-end server must be specified. If you specify this option together with the -d option, specify the process ID of a single server process, dictionary server process, front-end server process, or back-end server process. The pdls command (with prc specified in the -d option) can be used to display process IDs. The process ID of the process to be forcibly terminated can be determined from the service request acceptance time for the corresponding UAP.
-d
Specifies that the HiRDB process is to be forcibly terminated after a core dump is acquired. If the process is engaged in transaction processing, the command forcibly terminates the dictionary server process, front-end server process, and back-end server process handling the transaction, then acquires a core dump.
(b) Utility
-x host-name ~<identifier> ((1-32))
Specifies the name of the host containing the system manager. In the case of the database initialization utility (pdinit) or the database structure modification utility (pdmod), the host name of the dictionary server must be specified.
The host name can be obtained by the pdls command.
-X unit-identifier ~<identifier> ((4 characters))
Specifies the unit identifier of the unit where the utility is located. However, if the database initialization utility or the database structure modification utility is being terminated forcibly, the identifier of the unit which where the dictionary server is located must be specified.
You can use the pdls -d prc command to determine the unit identifier.
-u UAP-identifier ~<identifier> ((1-8))
Specifies the name of the server processing the utility. A server name begins with 0m in the list of names displayed by the pdls command (prc specified in the -d option). For example, the server name for the database load utility (pdload) is displayed as 0mload0. To forcibly terminate the database structure modification utility, pdmod must be specified as the UAP identifier.
The following table lists the server name for each utility:
UtilityServer name
Database initialization utility (pdinit)0minitx#
Database load utility (pdload)0mloadx#
Database structure modification utility (pdmod)pdmod
Database reorganization utility (pdrorg)0mrorgx#
Dictionary import/export utility (pdexp)0mexpx#
Rebalancing utility (pdrbal)0mrbalx#
Free page release utility (pdreclaim)0mrorgx#
Global buffer residence utility (pdpgbfon)0mrorgx#
Database condition analysis utility (pddbst)0mdbst
Optimizing information collection utility (pdgetcst)0mgcst
Database copy utility (pdcopy)0bcpyx#
Database recovery utility (pdrstr)0brstr
#: x at the end of a name is a numeric character (0, 1, 2, ...).
-i process-ID~<unsigned integer> ((1-10))
Specifies the process ID of the utility that is to be terminated forcibly. This option must be specified in order to terminate a utility.
-d
Specifies that the utility is to be forcibly terminated after a core dump is acquired. If the utility is engaged in transaction processing, the command forcibly terminates the single server process, dictionary server process, and back-end server process handling the transaction, then acquires a core dump.

(5) Rules

  1. The pdcancel command can be executed only while HiRDB is active.
  2. The pdcancel command can be executed from any server machine except one that contains a utility special unit.
  3. In the case of UAP-connected processes, the pdcancel command (-d option not specified) can be used only to forcibly terminate processes engaged in transaction processing. If transaction processing has not started or has already terminated, but the single server or front-end server process does not send a response to the UAP, terminate the single server or front-end server process by executing the pdcancel command with the -d option specified (in this case, a core dump is collected) or by executing the kill OS command. Whether or not the process corresponding to the specified UAP is engaged in transaction processing can be determined from the information displayed by the pdls command (trn -a specified in the -d option). If information is displayed for the UAP, the process is engaged in transaction processing; otherwise, the process is not engaged in transaction processing.
  4. If the pdcancel command is not executed for a process that is still engaged in processing at the HiRDB side although the corresponding UAP had been terminated due to an error, the process will be forcibly terminated when the time specified in the corresponding client environment definition (PDSWAITTIME) is reached.

(6) Notes

  1. The result of the pdcancel command can be checked by the pdls command (-d prc specified).
  2. The pdcancel command may not execute if a non-alphanumeric character was specified for PDCLTAPNAME in the client environment definition.
  3. A utility should not be cancelled unnecessarily.
  4. Return code 0 for the pdcancel command indicates normal termination, and return code 8 indicates abnormal termination (such as an invalid option or rsh error).