pddbchg (Change the replica status of replica RDAREAs)

Function

The pddbchg command changes the replica status of replica RDAREAs (from sub-RDAREA to current RDAREA).

You can use the pddbchg command when HiRDB Staticizer Option has been installed.

Executor

HiRDB administrator

Format

pddbchg -q generation-number -r {RDAREA-name[,RDAREA-name]...|ALL} [-w]

Options

Specifies the generation number of RDAREAs that are to be current RDAREAs.

RDAREA-name[Figure]<identifier> ((1-30))
Specifies the original name of an RDAREA that is to be a current RDAREA. You can specify user RDAREAs and user LOB RDAREAs. You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.
ALL
Specifies that all replica RDAREAs with the generation number specified in the -q option are to be switched to current RDAREAs.
Rules
  1. If the same RDAREA name is specified more than once, the duplicate RDAREA name is ignored.
  2. You can specify a maximum of 128 RDAREA names. If more than 128 RDAREA names are specified, the excess names are ignored.
  3. If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

Specifies that if a specified RDAREA is locked, the command is to wait until the RDAREA is unlocked or until the value specified in the pd_lck_wait_timeout operand of the system definition operand is reached.

If you omit this option and a specified RDAREA is locked by another transaction, the command terminates with an error.

Rules

  1. The pddbchg command can be executed only while HiRDB is active.
  2. The pddbchg command must be executed at the server machine that contains the single server or where the system manager is located.
  3. When you execute the pddbchg command, the data dictionary RDAREA must be in one of the following statuses:
    • Open and shutdown release status
    • Open, and with shutdown status placed by the pdhold command
  4. The pddbchg command enables you to change a current RDAREA regardless of the status of the RDAREA because the command does not check the status of the existing and new current RDAREAs.
  5. You cannot use the pddbchg command on an original RDAREA that employs updatable online reorganization.
  6. If the pddbchg command is executed on a shared RDAREA, all back-end servers are locked. If there can be multiple concurrent accesses to the corresponding RDAREA, global deadlock may occur, resulting in a timeout. If global deadlock has occurred, re-execute the pddbchg command.

Notes

  1. The result of the pddbchg command can be checked by the pddbls command.
  2. The pddbchg command locks the data dictionary table, inner replica configuration, and the specified RDAREAs. While the pddbchg command is executing, an attempt to access an RDAREA at the corresponding server results in wait status due to the locked inner replica resources. For details about the lock, see B.1 Lock mode for operation commands.
  3. The following describes the relationship among the pddbchg command, transactions, and utilities in terms of the lock-release wait status:
    • pddbchg command processing when another transaction or utility is accessing the current RDAREA
      When the -w option is specified
      The pddbchg command is placed in lock-release wait status for all locked resources until the value specified in the pd_lck_wait_timeout system definition operand is reached or the transaction accessing the resources terminated.
      When the -w option is not specified
      The pddbchg command terminates with an error if another transaction is accessing the data dictionary table, the server containing a specified original RDAREA, a new current RDAREA, or an existing current RDAREA.
    • Other transaction's or utility's processing when the pddbchg command is accessing the current RDAREA
      Another transaction or utility is placed in wait status until the pddbchg command terminates or the value specified in the pd_lck_wait_timeout system definition operand or the PDCWAITTIME client environment definition operand is reached.
  4. When the pddbchg command is executed, deadlock may occur for a referencing or updating transaction. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value in the pd_command_deadlock_priority operand, you can specify whether the referencing or updating transaction or the operation command is to take control in the event of deadlock.
  5. If an error occurs during pddbchg command processing, the processing is cancelled for each server that contains an RDAREA being processed. If this happens, the pddbchg command resumes processing at the other servers.
  6. The following shows the pddbchg command's return code:
    0: Normal termination
    4: Warning termination (some RDAREA processing terminated with an error)
    8: Abnormal termination
    12: Abnormal termination (an event occurred that prevented output of the error message)
    If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.