2.121.2 When executing the pdtrnqing command while using the standby-less system switchover (effects distributed) facility
(1) Function
The pdtrnqing command starts or releases transaction queuing for a back-end server that is using the standby-less system switchover (effects distributed) facility.
(2) Purpose of this command
The pdtrnqing command is used to queue new transactions before planned system switchover is performed by the standby-less system switchover (effects distributed) facility.
When the pdtrnqing command is executed, queuing of new transactions begins for the back-end server subject to command execution and the new transactions will be placed in wait status (except for a transaction that is being executed).
(3) Prerequisites
To use the pdtrnqing command, you must have specified queuing in the pd_ha_transaction operand beforehand.
If error (default value) was specified in the pd_ha_transaction operand, the pdtrnqing command terminates without starting or releasing transaction queuing, and 4 is set as the return code.
(4) Executor
(5) Format
pdtrnqing [-d [-f]][-t wait-time]-s back-end-server-name |
(6) Options
(a) -d
Specifies that transaction queuing is to be released.
(b) -f
Specifies that transaction release processing is to be applied to an inactive unit. You can specify this option only when the -d option is also specified to release transaction queuing. You specify this option in the following cases:
- The unit containing the back-end server that is to be subject to processing by the pdtrnqing command is inactive. Specification of -f enables you to execute the pdtrnqing command while the unit is inactive.
- The pdtrnqing command is being executed from an inactive unit (such as the unit containing the system manger).
(c) -t wait-time ~<unsigned integer>((1-3600)) (seconds)
- When this option is specified to start transaction queuing
Specifies the amount of time (in seconds) that the pdtrnqing command is to wait for completion of an executing transaction (executing at the back-end server that is subject to processing by the pdtrnqing command). If the executing transaction is not completed within the specified number of seconds, the pdtrnqing command cancels transaction queuing and terminates itself with an error.
- When this option is specified to release transaction queuing
If the back-end server subject to processing by the pdtrnqing command is on standby or is starting, specifies the amount of time (in seconds) to wait for the back-end server's start processing to be completed. If the back-end server start processing is not completed within the specified number of seconds, the pdtrnqing command terminates with an error without releasing transaction queuing.
Note that the wait time value specified here must be no greater than the value set in the pd_ha_trn_queuing_wait_time operand (default: 180 seconds). If the specified value is greater than the value of the pd_ha_trn_queuing_wait_time operand, the specified value here is ignored and the value of the pd_ha_trn_queuing_wait_time operand is assumed.
(d) -s back-end-server-name ~<identifier>((1-8))
Specifies the back-end server that is to be processed by the pdtrnqing command. Specify a back-end server to which the standby-less system switchover (effects distributed) facility is applied.
(7) Rules
- You can execute the pdtrnqing command from any server machine.
- In the following cases, the pdtrnqing command terminates normally and the transaction queuing application status remains unchanged:
- While the transaction queuing instruction was being applied, an attempt was made to restart transaction queuing by executing another pdtrnqing command.
- Transaction queuing was not being performed, but an attempt was made to release transaction queuing by executing the pdtrnqing -d command.
- The target unit must be running when the pdtrnqing command executes. In addition, the back-end server subject to processing by the pdtrnqing command must be in the following status:
Option specified in the pdtrnqing command | Status of back-end server subject to processing by the pdtrnqing command |
---|
Inactive | Standby | Starting | Running | Stopping |
---|
None | N | N | N | Y#1 | N |
-d | N | W#2, #3 | Y#2 | Y | N |
-d -f | Y | Y | Y | Y | Y |
- Legend:
- Y: The pdtrnqing command can be executed.
- N: The pdtrnqing command cannot be executed.
- W: The command waits for completion of back-end server start processing. If the back-end server start processing is completed within the amount of time specified in the pd_ha_trn_queuing_wait_time operand, transaction queuing is released. Otherwise, the pdtrnqing command results in an error.
- #1
- The pdtrnqing command waits until a transaction being processed at the back-end server specified in the -s option is completed. If the transaction is not completed within the amount of time specified in the pd_ha_trn_queuing_wait_time operand, the pdtrnqing command results in an error.
- #2
- If the back-end server specified in the -s option is on standby or is starting, the pdtrnqing command waits until the back-end server start processing is completed. If the start processing is not completed within the amount of time specified in the pd_ha_trn_queuing_wait_time operand, the pdtrnqing command results in an error.
- #3
- An error results if the pdtrnqing -d command is executed during the period beginning immediately after the back-end server is switched over to the running system until the server status managed by HiRDB is set to Starting. Therefore, when the back-end server is on standby, the command waits for the completion of back-end server start processing.
(8) Notes
- If the back-end server is on standby when transaction queuing is to be released, the command waits for completion of the back-end server start processing. Therefore, if the wrong back-end server (one that is still on standby) is specified as the target of the command's processing, the pdtrnqing command does not result in an error immediately. In such a case, the pdtrnqing command terminates with an error after the amount of time specified in the -t option has elapsed.
- Transaction queuing is released automatically when any of the operations listed below is performed:
- Restarting the back-end server for which transaction queuing is being performed (including when system switchover has occurred on the back-end server)
- Terminating the system, unit, or server (pdstop command)#1, #2
- Updating to the HiRDB update version (pdprgrenew command)
- Executing the system reconfiguration command (pdchgconf command)
- #1
- Transaction queuing is released if the unit for which transaction queuing is being performed or a server in that unit is terminated.
- #2
- Transaction queuing might also be released when the pdstop command terminates with an error.
(9) Return code
The following are the pdtrnqing command's return codes:
- 0: Normal termination
- 4: Warning termination
- This code is returned if transaction queuing cannot be performed because queuing is not specified in the pd_ha_transaction operand.
- 8: Error termination
- 12: Error termination
- Return codes 8 and 12 indicate that the command was unable to start or release transaction queuing. In such a case, a message is output to the syslogfile and to the standard error output.
- The command terminates with return code 8 if the executing environment was invalid or an erroneous operation was performed; in all other cases, the command terminates with return code 12.