Nonstop Database, HiRDB Version 9 System Operation Guide
In the following cases, the target RDAREAs must be backed up and held:
When RDAREAs are backed up and held, the backup can be made even during an online session. Specify the -b option in the pdhold command to back up and hold RDAREAs.
The following table explains the four types of backup-hold.
Table 6-5 Types of backup-hold
Backup-hold type | Explanation |
---|---|
Reference-possible backup-hold | During backup-hold, RDAREAs that have been backed up and held can be referenced; an updating attempt results in an SQL error (-920). Characteristics and precautions
|
Reference-possible backup-hold (update WAIT mode) | During backup-hold, RDAREAs that have been backed up and held can be referenced; an updating attempt goes into lock-release wait status until the backup-hold is released. Characteristics and precautions
|
Updatable backup-hold | During backup-hold, RDAREAs that have been backed up and held can be referenced and updated. Even while an updating transaction is being executed, an RDAREA is placed immediately in updatable backup-hold status without placing the pdhold command in wait status. Characteristics and precautions
|
Updatable backup-hold (WAIT mode) | During backup-hold, RDAREAs that have been backed up and held can be referenced and updated. If an updating transaction is being executed, the pdhold command is kept waiting until the transaction terminates. Characteristics and precautions
|
Table 6-6 Backup-hold inheritance states during HiRDB reactivation
Backup-hold type | Backup-hold status inheritance during reactivation |
---|---|
Reference-possible backup-hold | Yes |
Reference-possible backup-hold (update WAIT mode) | No |
Updatable backup-hold | No |
Updatable backup-hold (WAIT mode) | No |
Yes: Status is inherited.
No: Status is not inherited.
Note that a lock-release timeout might occur when the following backup-hold modes are used:
For a reference-possible backup-hold (update WAIT mode), an updating transaction waits for lock release at the RDAREA that has been backed up and held (resource type 0602) until the backup-hold is released. In the updatable backup-hold and updatable backup-hold (WAIT mode) modes, an updating transaction in the no-log mode or pre-update log acquisition mode waits for lock release at the RDAREA that has been backed up and held (resource type 0602) until the backup-hold is released.
Consequently, if the value specified in the pd_lck_wait_timeout operand or the PDCWAITTIME operand of the client environment definition is shorter than the time between backup-hold and its release, the updating transaction terminates in an error. If such an error occurs, change the specification values of these operands.
Backup acquisition in these modes is recommended when the mirror disk facility with a short duration between shutdown and release (the time needed for dividing the logical volume only) is used for making backups.
Note that a deadlock might occur when backup and hold is applied to multiple RDAREAs in the following modes:
In the reference-possible backup-hold (update WAIT mode) mode, deadlock with an updating transaction might occur. In the updatable backup-hold and updatable backup-hold (WAIT mode) modes, deadlock might occur with an updating transaction in the no-log mode or pre-update log acquisition mode. To ensure that the updating transaction does not terminate in an error, specify pd_deadlock_priority_use = Y. In this case, if deadlock occurs, the pdhold command terminates in an error. Therefore, re-execute the pdhold command after a short while. If multiple RDAREAs are specified in the pdhold command, backup-and-hold processing for all RDAREAs becomes invalid. If multiple RDAREAs are backed up and held using the pdhold command multiple times, deadlock might occur in the RDAREAs that have been backed up and held. In this case, first release the RDAREAs that have been backed up and held, and then re-execute the pdhold command. Therefore, when applying backup and hold to multiple RDAREAs, specify multiple RDAREAs in a single pdhold command (repeat execution of the command until successful).
In the case of a HiRDB parallel server configuration, global deadlock can occur if RDAREAs on different servers are specified. HiRDB cannot detect global deadlock, so the transactions result in timeout errors. To avoid global deadlock, execute the pdhold command in units of servers when you specify more than one RDAREA.
When the database is updated during updatable backup-hold, additional system logs are output. For details about how to estimate the volume of the additional system logs that are output, see Amount of system log information output during an updatable backup hold in the HiRDB Version 9 Installation and Design Guide. If HiRDB is abnormally or forcibly terminated during backup-hold, the backup-hold is not inherited when HiRDB restarts (excluding reference-possible backup-hold). Therefore, no additional system logs are output.
To restore the database to the most recent synchronization point (including restoration with a range specified), the system logs after the backup acquisition are needed. The following table shows how to determine which system logs are needed for database restoration.
Table 6-7 Determining the system logs needed for database restoration (when backup-hold is being used)
Condition | Determining the system logs needed for database restoration |
---|---|
|
The system log subsequent to when the backup was made is needed. Before making a backup, execute the pdlogls command to record the following information about the current system log:
|
Updatable backup hold (WAIT mode) | The system log from the point at which execution of the backup hold command began is required. Before executing backup hold, execute the pdlogls command to record the following information:
|
Updatable backup-hold | Refer to the KFPS02183-I message, which indicates the starting position of the system logs needed for database restoration.# The system log file file group name, generation number, and synchronization point dump acquisition start time indicated in the KFPS02183-I message output before the updatable backup-hold indicate the starting position of the system logs needed for database restoration. To check the log server process run ID, use the pdlogls command. Specify the synchronization dump acquisition start time if the -T option is to be specified in the pdrstr command. |
The Logical Volume Manager (LVM) is used and the pdcopy command is executed in the updatable mode. | Refer to the pdcopy command's processing results listing. |
#: When pd_spd_assurance_msg=N is specified, the KFPS02183-I message is not output.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.