2.90 pdpfresh (Refresh server process)

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

(1) 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).

(2) Executor

HiRDB administrator

(3) Format

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

(4) Options

(a) -s server-name ~<identifier> ((1-8))

Specifies the name of the server to be refreshed.

In a HiRDB parallel server configuration, you can specify a back-end server or dictionary server (but not a front-end server). When this option is omitted, the command assumes all servers (except front-end servers).

In a HiRDB single server configuration, the command assumes the single server regardless of the -s option.

(b) -f

Specifies that the server is to be refreshed forcibly.

The table below describes the process termination timing depending on whether the -f option is specified and the difference in possible errors.

Table 2-25 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.
Back-end server process that is using the local buffer for each APThe 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 might occur between the HiRDB client and HiRDB server. For a back-end server, no error occurs.
Note that server process refreshing is not completed as long as these processes exist.
The server process is forcibly terminated when the transaction ends. If SQL statements are executed thereafter, a new connection is established with the process and the processing is performed.
The following server processes:
  • Single server process locked with UNTIL DISCONNECT
  • Single server or back-end server process that is using a holdable cursor
  • Single server process that used an SQL session-specific temporary table or a back-end server process that is using an SQL session-specific temporary table
The server process is forcibly terminated when the transaction ends. If SQL statements are executed thereafter, a new connection is established with the process and the processing is performed.
Back-end server process 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 forcibly terminated when the transaction ends. If SQL statements are executed thereafter, a new connection is established with the process and the processing is performed.
(c) -c

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.

(5) 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 configuration, 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 configuration, 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 9 UAP Development Guide.

(6) 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 specifiedThere is no process to be refreshed.N/A
    -c option not specifiedRefresh processing has started.
    1-c option specifiedA process is being refreshed.Output only when the -c option is specified.
    -c option not specifiedN/A
    4Terminated with warning (error occurred at one ore more servers).#Output only for a HiRDB parallel server configuration.
    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.
  7. If there are many server processes to be refreshed, it might take time to refresh all of them.
  8. The execution results depend on the order in which the pdpfresh command (with the -f and -c options both omitted) and the utility are executed:
    Order of execution of pdpfresh command and utilityProcesses allocated by utility executionpdpfresh command execution results
    Executing the utility first, and then the pdpfresh command--Termination with an error (return code = 6)
    Executing the pdpfresh command first, and then the utilityProcesses subject to refreshing#1Normal termination (return code = 0)
    Refreshed processes#2
    Legend: --: Not applicable
    #1
    The processes are refreshed after the utility has terminated. The pdpfresh -c command terminates with return code 1 until the refresh processing is completed.
    #2
    The pdpfresh -c command is treated as a refreshed process because the utility allocates refreshed processes for execution.
    If the pdpfresh command (with the -f and -c options omitted) and the utility are executed concurrently or consecutively, execution results become undefined. To avoid this, take one of the following actions:
    • After executing the pdpfresh command (with the -f and -c options omitted), use the pdpfresh -c command to verify that processes have been refreshed, and then execute the utility.
    • Wait until the utility has terminated, and then execute the pdpfresh command (with the -f and -c options omitted).