pdpfresh (Refresh server process)

Function

The pdpfresh command refreshes the server process. Refreshing means terminating the active process and starting a new process.

This command is applicable to single servers, back-end servers, and dictionary servers.

When executing updatable online reorganization, you can use the pdpfresh command to create the status in which no user server process is accessing a target server's RDAREAs even if the RDAREAs' open attribute is INITIAL or DEFER (status that enables RDAREAs to be disconnected).

Executor

HiRDB administrator

Format

 pdpfresh [-s server-name] [{-f|-c}]

Options

Specifies the name of the server to be refreshed.

You can specify a single server for a HiRDB/Single Server or a back-end server or dictionary server for a HiRDB/Parallel Server (you cannot specify a front-end server).

When this option is omitted, the command assumes all servers (except front-end servers).

Specifies that the server is to be refreshed forcibly.

Table 2-12 describes the process termination timing depending on whether or not the -f option is specified and the difference in possible errors.

Table 2-12 Process termination timing depending on whether or not the -f option is specified and difference in possible errors (pdpfresh command)

Process-f option
Not specifiedSpecified
Single server, back-end server, or dictionary server process during utility's internal processingIf the pdpfresh command is executed during utility execution, the server process terminates with an error (return code = 6) without being refreshed. This has no effect on the utility's processing.The server process is forcibly terminated when the transaction ends. In this case, the utility may terminate abnormally.
Processes of the following servers:
  • Single server locked with UNTIL DISCONNECT
  • Single server using a holdable cursor or back-end server
  • Back-end server using local buffer for each AP
The server process is not forcibly terminated. The process is terminated when it no longer satisfies the conditions listed at left or the next time DISCONNECT occurs.
In the case of a single server, a connection error may occur between HiRDB client and HiRDB server. For a back-end server, no error occurs.
Note that server process refreshing is not completed as long as the these processes exist.
The server process is terminated forcibly when the transaction ends. Thereafter, all SQL statements executed on this process will result in a connection error.
Process of the back-end server that is using the BES connection holding facilityIf a transaction is being processed, the process is refreshed after the transaction ends. If no transaction is being processed, the process is refreshed after the next transaction ends.The server process is terminated forcibly when the transaction ends. Thereafter, all SQL statements executed on these processes will result in an SQL connection error.

Specifies that the command is to check whether or not all processes that received the process termination request have terminated. Specify this option when you want to monitor the process refreshing status using a shell.

You can obtain the result from the pdpfresh command's return code (the result is also displayed in the KFPS00730-I message).

To check each process's refreshing status, execute the pdls -d prc -c command.

Rules

  1. The pdpfresh command can be executed only while HiRDB is active.
  2. The pdpfresh command must be executed at the server machine that contains the single server or where the system manager is located.
  3. The pdpfresh command terminates without waiting for server process refreshing to be completed. If an error occurs during refreshing, an error message may be displayed after the pdpfresh command has terminated with return code 0.
  4. If you execute one pdpfresh command and then another before process refreshing is completed, the second pdpfresh command refreshes the process that is active during the re-execution of the command
  5. If the name of a front-end server is specified for a HiRDB/Parallel Server, the command terminates normally without refreshing.
  6. A server process executing a transaction is terminated when the transaction is completed; it is not terminated immediately.
  7. For a HiRDB/Single Server, a connection error may occur between HiRDB client and server during refreshing. To avoid this, add the processing for re-establishing connection to the UAP. If you use the automatic reconnect facility, connection is re-connected automatically; this error is not returned to the UAP. For details about the automatic reconnect facility, see the HiRDB Version 8 UAP Development Guide.

Notes

  1. The result of the pdpfresh command can be checked with the pdls -d prc command or on the basis of the return code from execution of the command. The following table describes the return codes from command execution:
    Return codeExecution resultRemarks
    0-c option specifiedRefresh processing has started.N/A
    -c option not specifiedThere is no process to be refreshed.
    1-c option specifiedN/AOutput only when the -c option is specified.
    -c option not specifiedA process is being refreshed.
    4Terminated with warning (error occurred at one ore more servers).*Output only for a HiRDB/Parallel Server.
    6Terminated without executing refresh processing because a utility was executing.Output only when the -f option is not specified.
    8Abnormal terminationN/A
    Legend: N/A: Not applicable
    * If there is no response from one or more servers for some reason, the command continues processing for other servers and then terminates itself with return code 4. In such a case, check the status of each server that resulted in an error.
    If a server resulting in an error is active, RDAREAs may continue to be accessed by the applicable server process (avoid re-synchronization of paired volumes). If this is the case, re-execute the pdpfresh command specifying the name of that server in the -s option.
  2. The pdpfresh command terminates without waiting for server process refreshing to be completed.
  3. Refreshing is completed if one pdpfresh command with the -c option omitted terminates with return code 0 and then another pdpfresh command with the -c option specified terminates with return code 0.
  4. Termination of the pdpfresh command with the -c option specified with return code 0 means that no process was being refreshed during the command's execution (it does not mean that refresh processing was executed and then was completed). If you execute the pdpfresh command with the -c option specified without executing the pdpfresh command with the -c option omitted, the command terminates with return code 0, but refresh processing does not occur.
  5. When you use the pdpfresh command for server process refreshing, the KFPS01820-E, KFPS04620-I, and KFPS01819-I messages are not displayed.
  6. During refresh processing, the system temporarily sets the number of resident processes to 0. Therefore, do not execute the pdpfresh command on a server while it is being refreshed. If you do, refresh processing may not be completed. If this happens, re-execute the pdpfresh command, wait until refresh processing is completed, and then execute the pdchprc command.