pdaudswap (Swap audit trail files)
Function
The pdaudswap command swaps audit trail files (changes the audit trail file that is the current audit trail file).
Executor
Auditor
To execute the pdaudswap command, you must specify the -U option or set the auditor's authorization identifier and password in the PDUSER environment variable. If the auditor's authorization identifier and password are not correct, a command error results.
Format
- HiRDB/Single Server
Pdaudswap [-U authorization-identifier] |
- HiRDB/Parallel Server
pdaudswap -u unit-identifier [-U authorization-identifier] |
Options
- -u unit-identifier
<identifier> ((4 characters))
Specifies the identifier of the unit that contains the audit trail file to be swapped.
- -U authorization-identifier
Specifies the auditor's authorization identifier. When this option is specified, a message requesting entry of a password is displayed.
- Rules
- The command uses the authorization identifier specified in this option and the password that is entered to connect to HiRDB and checks to determine whether this authorization identifier has the audit privilege.
- You can specify this option when you execute the pdaudswap command in an environment in which you can enter a response to a response-request message.
- When this option is omitted, the pdaudswap command assumes the value set in the PDUSER environment variable at the time of command execution. If this option is omitted and the PDUSER environment variable has not been set, the pdaudswap command cannot be executed. If this option is omitted, the PDUSER environment variable must be set; the following shows an example:
Example: C shell
setenv PDUSER '"authorization-identifier"/"password"'
Rules
- The pdaudswap command can be executed only while HiRDB is active. You cannot use this command when HiRDB was started by the pdstart -r command.
- The pdaudswap command must be executed at the server machine that contains the single server or where the system manager is located.
- A command error results if you execute the pdaudbegin, pdaudend, pdaudrm, or pdaudswap command while the pdaudswap command is executing.
- The pdaudswap command results in a command error if the pd_aud_file_name operand has not been specified in the system definition or the audit trail file specified in the pd_aud_file_name operand is missing.
- If there is no swappable file generation or no audit trail file generation has been created, a command error results.
- If an open error occurs on the swappable audit trail file generation, the command automatically uses another generation of the file as the target.
- If pd_aud_no_standby_file_opr=down was specified in the system definition and the number of available generations is 1 or fewer, executing the pdaudswap command results in a command error.
Notes
- The result of pdaudswap command can be checked by using the pdaudswap command, by checking for any error messages, or on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 8 indicates abnormal termination.