19.4.2 Options
- Organization of this subsection
- (1) -m [host-name:]name-of-first-HiRDB-file-in-master-directory-RDAREA
- (2) -b {[host-name:]backup-file-name[,backup-file-name]...|[host-name:]device-symbolic-name[,device-symbolic-name]|[host-name:]device-group-name|[host-name:]policy-name}
- (3) -l [host-name:]unload-log-filename [,unload-log-filename]...
- (4) -L
- (5) -d [host-name:]unload-log-file-storage-directory-name[,unload-log-file-storage-directory-name]...
- (6) -p process-results-output-file-name
- (7) -w name-of-work-directory-for-sorting
- (8) -y work-buffer-size-for sorting
- (9) -k {u|i|e|m|n}
- (10) -E EasyMT-MT-attributes-definition-file-name
- (11) -B EasyMT-I/O-buffer-sectors-count
- (12) -v volume-name[,volume-name]...
- (13) -N EasyMT-file-name
- (14) -U {backup-search-condition-start-time,backup-search-condition-end-time|,backup-search-condition-end-time}
- (15) -g differential-backup-group-name
- (16) -K name-of-HiRDB-file-system-area-storing-differential-backup-management-file
- (17) -q generation-number
- (18) -x generation-number
- (19) -Y write-buffer-size
- (20) -W execution-monitoring-interval
- (21) [-I message-output-level[,message-output-interval]]
- (22) -f control-statement-file-name
- (23) -a
- (24) -c
- (25) -u unit-identifier[,unit-identifier]...
- (26) -s server-name[,server-name]...
- (27) -r RDAREA-name[,RDAREA-name]...
- (28) -T{recovery-start-time,recovery-end-time|recovery-start-time |recovery-end-time}
- (29) -z log-point-information-file-name
(1) -m [host-name:]name-of-first-HiRDB-file-in-master-directory-RDAREA
~<identifier:pathname>
Specifies the name of the first HiRDB file in the master directory RDAREA. Specify the name of the host containing the master directory RDAREA and the path name, separated by a colon (:). This is the name specified in the pd_master_file_name operand in the system common definitions.
- Example
- -m host01:/hirdb_s/rdarea/rdmast
- Rules
- You can omit the host name if the master directory RDAREA is located at the server machine where the database recovery utility is executed (where the pdrstr command is entered). In this case, specify only the path name.
- If you specify a host name, make sure that it is a host name specified in the -x option of the pdunit operand in the system definition.
- If you are using the system switchover facility, be sure to specify the host name of the primary system.
(2) -b {[host-name:]backup-file-name[,backup-file-name]...|[host-name:]device-symbolic-name[,device-symbolic-name]|[host-name:]device-group-name|[host-name:]policy-name}
~<identifier: path name> ((up to 167 characters when -k i is specified))
Specifies the names of the backup files or the name of a NetBackup policy.
- When specifying a backup file name, device symbolic name, or device group name
- Specify the name of the host that will contain the backup files, separated by a colon (:) from the names of the backup files, or from the device symbolic name, or from the device group name. Specify a pathname for a backup filename, and an identifier for a device symbolic name or device group name.
- Example
- -b host01:/usr/pdcopy/backup01
- When specifying a policy name of NetBackup
- When using NetBackup, specify the name of the host that contains the NetBackup client, separated by a colon (:) from a policy name.
- Example
- -b host01:POLICY01
- Rules
- If the backup file is located at the server machine where the database recovery utility is executed (where the pdrstr command is entered), you can omit the host name; in which case, specify the path name only.
- If you specify a host name, make sure that it is a host name specified in the -x option of the pdunit operand in the system definition.
- If the server machine used to execute the database recovery utility (where the pdrstr command is entered) has a NetBackup client, you can omit the host name.
- If you are using the system switchover facility, make sure that the host name of the primary system is specified. Note, however, that the actual backup file or the NetBackup client must be on the running system.
- If the server machine used to execute the database recovery utility has a NetBackup client (where the pdrstr command is entered), you can omit the host name.
- If you are using the system switchover facility, make sure that the host name of the primary system is specified. The actual backup file or NetBackup client must at in the running system.
- When re-creating the log point information file, specify only the first file or first volume, even if multiple backup files or volumes are to be used (the utility references only the first file or volume, even if multiple files or volumes are specified).
- If you specify multiple backup files that were acquired individually by RDAREA, only the first backup file specified is recognized. No other backup file is recognized.
- If you specify a backup file that was made with -M s specified in the -b option, make sure that you specify the -l, -L, or -d option here.
- The following table shows the relationship between the -b and -k options:
-k option specification | Specifiable backup file |
---|
-k u | You can specify a regular file name or MT special file name. If a single backup was created in multiple files, specify the names of all such backup files in the order they were created. |
-k i | You can specify a backup file in the format "HiRDB-file-system-area-name/HiRDB-file-name". If a single backup was created in multiple files, specify the names of all such backup files in the order they were created. Note that a HiRDB file system area name is not case sensitive, but a HiRDB file name is case sensitive. |
-k e | You can specify an MT special file name. |
-k m | You can specify a maximum of two device symbolic names or one device group name managed by MTguide. The system does not check whether a device symbolic name or a device group name is specified. |
-k n | Specify the policy name of NetBackup that was obtained by pdcopy. For the host name, specify the name of the host that has both NetBackup client and HiRDB. HiRDB retrieves only the most recent backup of NetBackup. |
- For the backup, specify a copy made when the pdcopy command was executed and its return value was 0 or 4.
(3) -l [host-name:]unload-log-filename [,unload-log-filename]...
~<identifier: path name>
Specifies the names of unload log files created after the last backup file was created. Specify the name of the host containing the unload log files separated from the path names by a colon.
- Example
- -l host01:/usr/pdlogunld/unld01
- Rules
- When the -l option is specified, the -L, -c, and -d options cannot be specified.
- If the backup file is located at the server machine where the database recovery utility is executed (where the pdrstr command is entered), you can omit the host name; in which case, specify the path name only.
- If you are using the system switchover facility, make sure that the host name of the primary system is specified. Note that the actual backup file must be located in the running system.
- If a regular file was used to create the unload log file, specify the name of that regular file as the unload log file name. If a HiRDB file was used to create the unload log file, specify the unload log file name in the format "HiRDB-file-system-area-name/HiRDB-file-name". Make sure that "HiRDB-file-system-area-name/HiRDB-file-name" does not exceed 167 characters.
- Notes
- If there are multiple unload log files, you need to specify all of them in the chronological order of their generations, starting with the oldest one. In this case, specify the host name only once at the beginning. This means that all unload log files must be located at the specified host.
- To use unload log files for recovery, you must specify all required unload log files. If any required unload log file is missing, the utility issues a message (KFPR16203-E or KFPR16301-E) and terminates with an error.
(4) -L
When the system operation does not involve unloading of the system log, this option specifies that the system log files are to be input directly for database recovery.
- Rules
- When you are specifying this option, you also need to specify the name of the backup file with the -b option. This backup file must have been created by the pdcopy command specifying the -z option.
- When this option is specified, the -l, -c, and -d options cannot be specified.
(5) -d [host-name:]unload-log-file-storage-directory-name[,unload-log-file-storage-directory-name]...
~<identifier: path name>
Specifies the names of the directories that contain all the unload log files required for recovery. Separate the name of the host containing the unload log files and the path names with a colon (:).
- Criteria
- Use this option when many unload log files are needed for recovery (such as when there are too many unload log files to be specified on the command line for a single execution of pdrstr).
- Rules
- Make sure that the total length of the name of an unload log file storage directory and the file names in the directory does not exceed 1,023 bytes. You can specify a maximum of 128 directories.
- Make sure that the specified directories do not contain any files other than unload log files. The utility ignores any file that is not an unload log file.
- This option cannot be specified together with the -l or -L option.
- When this option is specified, the utility reads the unload log files in the order they were created (in chronological order of the system log allocation times); therefore, make sure that an unload log file created before or after the machine time was changed is not mixed in in a directory.
- A HiRDB file system area cannot be specified in this option.
- The input start position of the unload log files in a specified directory (unload log files to be loaded) depends on the backup acquisition mode of the backup file and the options specified during recovery. The following table describes the input start position of the unload log files:
Condition | Input start position of unload log files |
---|
Backup file that is used was made in the updatable mode (pdcopy -M s). | The utility inputs all unload log files in the directory. |
Backup file that is used was made in the referencing-possible mode (pdcopy -M r) or reference/update-impossible mode (pdcopy -M x). | Of the unload log files in the directory, the utility inputs all log information starting with the unload log file that includes the backup file acquisition start time. If there is any unload log file that needs to be input before the backup acquisition start time due to a time difference between machines, use the -T option to specify the recovery start time. Obtain the recovery start time based on the time difference between the backup destination host and the recovery target host. |
The -q option was specified during backup acquisition and recovery, and the generation numbers specified in the -q option during backup acquisition and recovery do not match. | The utility inputs all unload log files in the directory. |
-x c is specified during recovery. |
RDAREAs are recovered from unload log files only; backup files are not used. | The utility inputs all unload log files in the directory. |
The recovery start time is specified in the -T option during recovery. | The utility inputs the unload log files that fall on or after the recovery start time. |
In-memory RDAREAs are recovered | - Recovering an in-memory RDAREA from a backup and unload log files
The utility inputs the unload log files whose timestamps are at or after the time when the in-memory data buffer and the in-memory RDAREA were synchronized. If there are multiple in-memory RDAREAs, the utility inputs the unload log files created at or after the earliest synchronization time among the in-memory RDAREAs. For example, if backup files include a backup copy of RDAREAs RD01 and RD02, and the synchronization time for RD01 is 2013-12-15 at 13:45:23 and the synchronization time for RD02 is 2013-12-15 at 14:05:55, the utility inputs the unload log files created at or after 2013-12-15 at 13:45:23.
- Recovering in-memory RDAREAs from unload log files only without using backup files
Same as above.
- Recovering in-memory RDAREAs and other RDAREAs together
The utility inputs all unload log files under the directory.
|
- An error results if the specified directory contains an unload log file created when a UAP or utility was executed in the no-log mode or the pre-update log acquisition mode. In such a case, specify in the T option a backup start time that is after the execution in the no-log mode or the pre-update log acquisition mode to exclude the system logs in the no-log mode or the pre-update log acquisition mode.
(6) -p process-results-output-file-name
~<pathname>
Specifies the name of the file to which the processing result of the database recovery utility is to be output.
- Example
- -p /usr/pdrstr/list01
- Rules
- Specify the path name of the server machine at which the database recovery utility is executed (where the pdrstr command is entered).
- When this option is omitted, the database recovery utility outputs its processing results output file to the directory shown below on the server where the utility was executed:
-p option | pd_tmp_directory operand in the system definition |
---|
Specified | Omitted |
---|
TMPDIR environment variable# |
---|
Specified | Omitted |
---|
Specified | Directory specified in the -p option |
Omitted | Directory specified in pd_tmp_directory | Directory specified in TMPDIR | /tmp directory |
- #: Environment variable specified in the command execution environment
The utility displays the output destination in the KFPR26222-I message.
- Regardless of the specification of this option, the utility outputs all error messages to the system log file and standard output, and the final processing result to the standard output. However, error messages may not be output to the system log file and to the standard output in the same order.
(7) -w name-of-work-directory-for-sorting
~<pathname>
When the -l, -L, or -d option is specified, use this option to specify the name of the directory under which the temporary file is to be created. If the RDAREAs subject to recovery processing are located on multiple server machines, the specified directory must be in each of the server machines. When this option is omitted, the following directory is assumed:
-w option | pd_tmp_directory operand in the system definition |
---|
Specified | Omitted |
---|
TMPDIR environment variable# |
---|
Specified | Omitted |
---|
Specified | Directory specified in the -w option |
Omitted | Directory specified in pd_tmp_directory | Directory specified in TMPDIR | /tmp directory |
- #: Environment variable set in the process server process (pdprcd) that is started from init (OS process)
At least the following amount of free space must be available in the work directory for sorting:
a + (a
130
36)
- a: max {min total-amount-of-input-log-information, 1,536,000,000),amount-of-log information-at-maximum-interval-between-synchronization-points} (bytes)
- total-amount-of-input-log-information:
- Total capacity of the unload log file or system log file that is specified during execution of pdrstr
- amount-of-log information-at-maximum-interval-between-synchronization-points:
- Amount of log information that is acquired up to the next synchronization point since the last synchronization point. You can obtain this value from the following formula:
- Maximum number of times the processing for enabling a synchronization-point dump was skipped
(size of output system log information specified in pd_log_sdinterval![[Figure]](figure/zueng005.gif)
pd_log_max_data_size value
pd_log_rec_leng value![[Figure]](figure/zueng010.gif)
pd_log_rec_leng value)
(8) -y work-buffer-size-for sorting
(9) -k {u|i|e|m|n}
Specifies the type of backup file.
- u
- Specifies that a regular file backup or an MT backup is to be input without using EasyMT, or NetBackup. If the backup file consists of multiple volumes, you cannot specify this option.
- i
- Specifies that the input is a backup file created in a HiRDB file system area. This option is applicable when the backup file is shared by the running system and a standby system, and the standby system is to be recovered using the backup made by the running system.
- e
- Specifies that the input is a magnetic tape backup file (EasyMT). You cannot specify this option if the backup file consists of multiple volumes. This specification requires the use of EasyMT.
- m
- Specifies that the input is a magnetic tape backup file using EasyMT and MTguide. You must specify this option if the backup file consists of multiple volumes. This specification requires the use of EasyMT and MTguide.
- n
- Specifies that the database is to be recovered using NetBackup. In this case, specify the policy name of NetBackup in the -b option.
(10) -E EasyMT-MT-attributes-definition-file-name
~<path name>
Specifies the name of the EasyMT MT attributes definition file. This file must be connected to the server machine where the database recovery utility is executed (where the pdrstr command is entered). The -E option is applicable to a backup file that has been created with e or m specified in the -k option. The following attributes take effect:
- buffno: Number of I/O buffer sectors
- magazin: MT device allocation pattern
- job: Job name
- expire: Expiration date
- preserve: Number of days to be saved
When the -B option is specified, it takes precedence over the number of I/O buffer sectors specified in the MT attributes definition file.
The utility checks the information specified in this file when EasyMT is executed.
(11) -B EasyMT-I/O-buffer-sectors-count
~<unsigned integer> ((1-255))
Specifies the number of I/O buffer sectors to be used for magnetic tape input/output operations. A larger value results in better performance, but it requires more memory.
- Rules
- The -B option is applicable to a backup file that has been created with e or m specified in the -k option.
- If the -E and -B options are both omitted, the utility assumes EasyMT's default values.
(12) -v volume-name[,volume-name]...
~<alphanumerics> ((1-6 characters))
Specifies the volume names of the magnetic tapes that contain the backup data. When this option is specified, an error results if a volume mounted at a tape deck does not match any of the specified values. If the number of existing backup volumes is larger than the number of volumes specified here, the utility does not check any excess volume names. When this specification is omitted, the utility does not perform volume name checking.
This option is applicable to the backup file for which e or m is specified in the -k option. To specify multiple volume names, you need to specify m in the -k option. Make sure that each specified volume name is unique among all volumes used.
When re-creating the log point information file, specify only the first volume, even if multiple volumes are to be used (the utility references only the first volume, even if multiple volumes are specified).
(13) -N EasyMT-file-name
~<alphanumerics> ((1-17 characters))
Specifies the file name assigned when the backup file is created. This specification takes effect only on the backup file made with e or m specified in the -k option. An error results if the specified value does not match the input backup file.
The backup file must be created from the beginning of the mounted magnetic tape (beginning at file number 1).
(14) -U {backup-search-condition-start-time,backup-search-condition-end-time|,backup-search-condition-end-time}
Specifies that the database is to be recovered from a backup made at the specified time from among all the backups made with the same policy name. This option is applicable when the NetBackup linkage facility is used (-k n is specified). Otherwise, the utility ignores this option, if specified.
If both a backup search condition start time and a backup search condition end time are specified, the utility uses the most recent backup within the specified period for recovery. If only a backup search condition end time is specified, the utility uses the backup in effect at the specified end time for recovery.
- Rules
- When this option is omitted, the utility uses the most recent backup from among the backups made with the same policy name.
- You can use the bpimagelist command (with the -policy option specified) to check the dates and times at which backups were made.
- For the backup search condition start time and backup search condition end time, connect the date and time by an underscore (_), shown below. If the time is omitted, the utility assumes 000000 for the start time and 235959 for the end time.
-U YYYYMMDD[_hhmmss],YYYYMMDD[_hhmmss] |
- YYYY: Year ~<unsigned integer> ((1990-2037))
- Specifies the calendar year.
- MM: Month ~<unsigned integer> ((01-12))
- DD: Date ~<unsigned integer> ((01-31))
- hh: Hour ~<unsigned integer> ((00-23))
- mm: Minute ~<unsigned integer> ((00-59))
- ss: Second ~<unsigned integer> ((00-59))
- To specify only the end time, specify a comma immediately followed by the desired end time.
(15) -g differential-backup-group-name
~<alphanumerics> ((1-30))
If you are using the differential backup facility, use this option to specify the differential backup group name used with pdcopy.
(16) -K name-of-HiRDB-file-system-area-storing-differential-backup-management-file
~<pathname>
If you are using the differential backup facility, use this option to specify the name of the HiRDB file system area that contains the differential backup management file used with pdcopy.
Make sure that "name-of-HiRDB-file-system-area-storing-differential-backup-management-file/differential-backup-group-name" does not exceed 167 characters.
(17) -q generation-number
~<unsigned integer> ((0-10))
Specifies the generation number of the RDAREA to be restored when the inner replica facility is used. When 0 is specified, the utility restores the original RDAREA; when a value in the range 1 to 10 is specified, the utility restores the specified replica RDAREA generation.
- Rules
- Specify this option together with the -r option. This option cannot be specified together with the -a, -c, -u, or -s option.
- Specify this option to restore the replica RDAREA of the indicated generation number in the inner replica group to which the original RDAREA specified in the -r option belongs.
- The following table describes the -q option specification during the backup and recovery operations:
During recovery operation | During backup operation |
---|
-q option omitted | -q option specified |
---|
-q option omitted | The utility restores the RDAREAs for which a backup is available. The utility does not recover an RDAREA whose backup is not available. |
-q option specified | The utility restores the RDAREAs whose backup is available. The utility does not recover an RDAREA whose backup is not available. | The utility restores the RDAREAs even if their backups are not available as long as a backup of RDAREAs in the same inner replica group is available. |
(18) -x generation-number
~<unsigned integer or alphanumerics> ((0-10 or c))
Specifies the generation number of the RDAREA to be restored if the inner replica facility is used and the target RDAREA has been updated over multiple generations. If you specify this option, also specify the -q option.
- 0
- Specifies that the original RDAREA is to be restored.
- 1 to 10
- Specifies that the specified RDAREA generation is to be restored. For example, if you are restoring the first generation of an RDAREA using the log information for the first and second generations of the RDAREA, specify 1 in the -q option and 2 in the -x option.
- c
- Specifies that the current RDAREA in the system log file is to be restored. In this case, the utility uses log information for the current RDAREA in the system log file, ignoring the generation number.
- Rules
- If no RDAREA is defined that has the generation number specified in this option, the utility terminates with an error.
- Specifying the same generation number in both the -q and the -x options will not result in an error.
- By specifying c, you can always restore the current RDAREA using its log information even if the RDAREA is updated over three or more generations, or multiple generations are updated at the same time. When swapping occurs on the current RDAREA, the RDAREA must have the same contents immediately before and after swapping (not only the data but also the locations within file).
- When c is specified, the utility supports only the log information that has been output by HiRDB version 07-00 or later. If you are upgrading your HiRDB to version 07-00, make sure that all RDAREAs have been backed up using pdcopy with -a specified.
(19) -Y write-buffer-size
~<unsigned integer> ((4-131072))
Specifies the buffer size (in kilobytes) when recovery data is written during database recovery processing. Specifying this option reduces the number of write operations because the amount of data written at one time increases.
- Criteria
- Hitachi recommends that you specify this option when the following conditions are satisfied, to improve performance.
Data to be used for recovery | Condition |
---|
Differential backup file | The only data update operation performed after the previous differential backup was addition (INSERT statement) or deletion of all data (DELETE or PURGE TABLE statement). |
Unload log file or system log file | The principal update operation performed by the database updating application is addition (INSERT statement). |
- Specification guidelines
- You should specify a value in the range from 1024 to 2048.
- As a guideline for the value, specify a common multiple of the page length of all RDAREAs that are subject to database recovery processing.
- Rules
- When this option is omitted, the following value is assumed:
When the recovery processing uses a differential backup file, unload log file, or system log file, the page length of each RDAREA that is to be recovered
Otherwise, 60
- If the specified value is less than the maximum page length of the RDAREA to be recovered, the specified value is ignored and the default value is used.
(20) -W execution-monitoring-interval
execution-monitoring-interval ~<unsigned integer> ((0 to 3600))
Specifies (in minutes) the monitoring interval when the execution time of the database recovery utility is to be monitored. For guidelines on the value to specify and details about the resulting operation, see the description of the pd_cmd_exec_time operand in the system common definition in the manual HiRDB Version 9 System Definition.
If 0 is specified in this option, the utility's execution time is not monitored.
If this option is omitted, the value of the pd_cmd_exec_time operand in the system common definition takes effect.
(21) [-I message-output-level[,message-output-interval]]
Specifies that the database recovery utility's activity status is to be checked. The following four messages are output:
- KFPR26294-I: This message is displayed each time an RDAREA is to be recovered.#1
- KFPR26295-I: This message is displayed each time the message output interval elapses while an RDAREA is under recovery processing.#1
- KFPR26296-I: This message is displayed when log records are input to be read and sorted.#1, #2
- KFPR26297-I: This message is displayed each time log records are sorted.#1, #2
- #1
- If the -l, -d, or -L option is specified, this message is displayed each time 1.5 gigabytes of log informstion is used per server to perform recovery processing.
- #2
- If the -l, -d, or -L option is specified, this message is displayed only when log information becomes available for recovery processing.
Checking these messages enables you to determine whether the utility has become non-responsive.
- message-output-level ~<unsigned integer> {0|1}
- Specifies whether the messages for checking the activity status are to be displayed:
- 0: Does not display the messages for checking the activity status.
- 1: Displays the messages for checking the activity status.
- message-output-interval ~<unsigned integer> ((1 to 300) <<60>>
- Specifies (in minutes) the message output interval. This option enables you to change the interval for output of the KFPR26295-I message. Specify this option when you want to change the output interval from the default value.
(22) -f control-statement-file-name
~<pathname>
Specifies the name of the control information file.
- Example
- -f /usr/pdrstr/cont01
You can specify options (3) through (5) and (24) through (29) in the control statement file. You can also specify these options directly in the pdrstr command.
- The format of the control statement file is as follows:
{{-l flag-argument|-L|-d flag-argument}|{-a|-c|-u flag-argument|-s flag-argument|-r flag-argument}[-T flag-argument]}
[{{-l flag-argument|-L|-d flag-argument}|{-u flag-argument|-s flag-argument|-r flag-argument}[-T flag-argument]}]
[{{-l flag-argument|-L|-d flag-argument}|{-u flag-argument|-s flag-argument|-r flag-argument}[-T flag-argument]}]
.
.
. |
- Notes
- Create the control statement file at the server machine where the database recovery utility was executed (where the pdrstr command was entered).
- In the control statement file, you must specify the combination of target RDAREA specification options and the -T option on a single line.
- A line in the control statement file must not exceed 32,768 bytes.
- You can enter comments in the control statement file. However, a row containing only comments cannot be specified.
- For details about the option flags, see the explanations of the individual options.
- If the -u, -s, or -r option consists of multiple lines, you can specify on the subsequent lines only those option flags specified on the first line (except for the -a and -c options). For example, if you specify the -u option on the first line, you can specify the -u option on any subsequent line.
- If the -l option is specified on multiple lines, the last specification takes effect; the same applies to the -d option.
- An option specified on the command line cannot also be specified in the control statement file. However, the -T option can be specified on both the command line and in the control statement file, in which case the -T option specification on the command line applies to any item for which the -T option is omitted in the control statement file.
- Specification of a control statement file may not be supported depending on the combination of options specified on the command line. The following table shows the combinations of options and whether or not a control statement file can be specified:
-l, -L, or -d option | -a, -c, -u, -s, or -r option |
---|
Omitted | Specified |
---|
Omitted | Y#1 | Y#2 |
Specified | Y#3 | N |
- Legend:
- Y: Can be specified
- N: Cannot be specified
- #1: All options specifiable in the control statement file can be specified.
- #2: The -l, -L, or -d option can be specified.
- #3: The -a, -c, -u, -s, or -r option and the -T option can be specified.
- Example of correct control statement
-r pdbuser1 -T 20040809,20040810
-r pdbuser2 -T 20040809
-l /unldlog/unld01,/unldlog/unld02,
/unldlog/unld03,/unldlog/unld04 |
- This example uses the database update history stored in the unload log files unld01, unld02, unld03, and unld04 to recover the database. To recover the RDAREA pdbuser1, the example uses the database update history from 2004-08-09 00:00:00 to 2004-08-10 24:59:59. To recover the RDAREA pdbuser2, the example uses the database update information starting at 2004-08-09 00:00:00.
- Example of incorrect control statement (1)
-r pdbuser1 -T 20040809,20040810
/unldlog/unld01,/unldlog/unld02 Error |
- A line containing the -l, -L, or -d option cannot contain any other option.
- Example of incorrect control statement (2)
-r pdbuser1 -T 20040809,20040810
-r pdbuser2 -T 20040809
-l /unldlog/unld01
,/unldlog/unld02 Error |
- Because there is a limit to the length of a single line (maximum of 32,768 bytes including linefeed code), when the -l or -d option has a long argument, you can enter a linefeed code and continue specification onto the next line. The linefeed code can be entered only after the comma (,) that separates the path name of an unload log file. If the line specifying the -l or -d option ends with a character other than the comma, the utility treats it as the end of the line.
(23) -a
Specifies that all RDAREAs are to be restored (except for list RDAREAs and temporary table RDAREAs).
- Rules
- If you specify the -a option, the control statement file can contain only one line of control statement.
- If a replica RDAREA has been defined, it will also be subject to recovery processing.
(24) -c
Specifies that all RDAREAs in the backup files specified with the -b option (except the list RDAREAs) are to be restored.
- Rules
- If the -c option is specified, the control statement file can contain only one line of control statement.
- If you are specifying the -c option, be sure to also specify the -b option. However, when using the differential backup facility, you do not need to specify the -b option (if the -b option is specified, the utility assumes manual recovery; if the -b option is omitted, the utility assumes automatic recovery).
- If you are specifying the -c option, do not specify the -l option.
- If the backup file contains a backup of a replica RDAREA, the utility restores the source generation of that replica RDAREA.
- If you made a backup copy with the pdcopy command with the -J option specified and the KFPR26063-I was issued, recovery processing using that backup copy will not result in normal termination (because the skipped RDAREAs are also subject to recovery processing).
(25) -u unit-identifier[,unit-identifier]...
~<identifier> ((4 characters))
If all RDAREAs under specified units are to be restored (except for list RDAREAs and temporary table RDAREAs), use this option to specify the unit identifiers.
- Rules
- If specifying multiple unit identifiers, make sure none of them is duplicated.
- When using a control statement file, make sure that each specified unit identifier is unique among all the control statements.
- If a replica RDAREA has been defined, it will also be subject to recovery processing.
(26) -s server-name[,server-name]...
~<identifier> ((1-8 characters))
If all RDAREAs under specified servers are to be restored (except for list RDAREAs and temporary table RDAREAs), use this option to specify the server names.
- Rules
- If specifying multiple server names, make sure none of them is duplicated.
- When using a control statement file, make sure that each specified server name is unique among all the control statements.
- If a replica RDAREA has been defined, it will also be subject to recovery processing.
(27) -r RDAREA-name[,RDAREA-name]...
~<identifier> ((1-30 characters))
Specifies the names of the RDAREAs to be restored.
- Rules
- When a directly specified RDAREA name is duplicated.
- The following specifications will result in the KFPR26007-E error (boldface indicates the duplications):
-r LOB1,USER1 -T 20081125_000000,20081125_240000
-r DDIC,USER1 -T 20081126_000000,20081126_240000
- When an RDAREA name specified in the batch mode is duplicated.
- In the following example, the first value is effective (boldface indicates the duplications):
-r LOB1,USER* -T 20081125_000000,20081125_240000...This specification is effective
-r DDIC,USER* -T 20081126_000000,20081126_240000
- When a directly specified RDAREA name duplicates an RDAREA name specified in the batch mode.
- In the example shown below, the directly specified value is effective for USER1 (boldface indicates the duplications).
-r LOB1,USER1 -T 20081125_000000,20081125_240000...This specification is effective
-r DDIC,USER* -T 20081126_000000,20081126_240000
(28) -T{recovery-start-time,recovery-end-time|recovery-start-time |recovery-end-time}
Use this option to specify a recovery range.
When the -l, -d, or -L option is specified, specifies the output times of the first and last log information items to be used for database recovery.
- Rules
- If the -l, -d, or -L option is specified but this option is omitted, the first and last log output times in the system log files or unload log files are assumed.
- If the -l, -d, or -L option is omitted, this option is ignored. However, if the differential backup facility is used and this option is specified, this option takes effect.
- The recovery start time must be earlier than the recovery end time. If the specified recovery start time is later than the recovery end time, an error results and processing terminates. When you are specifying this option, make sure that a recovery start time, a recovery end time, or both are specified.
- The recovery start time and recovery end time are expressed as a date and time separated by an underscore (_), as shown below. If the time is omitted, the utility assumes 000000 for the recovery start time and 235959 for the recovery end time.
-T YYYYMMDD[_hhmmss],YYYYMMDD[_hhmmss] |
- YYYY: year ~<unsigned integer> ((1990-2037))
- MM: month ~<unsigned integer> ((01-12))
- DD: Date ~<unsigned integer> ((01-31))
- hh: hour ~<unsigned integer> ((00-23))
- mm: minute ~<unsigned integer> ((00-59))
- ss: second ~<unsigned integer> ((00-59))
- If the recovery end time only is specified, it must be preceded by a comma (,); if the recovery start time only is specified, it must not be followed by a comma.
- Notes
- When executing recovery with a time range specified, be sure to specify the time of the server machine that contains the RDAREAs being recovered because the time differs from one server to another.
- When using a backup file to execute recovery with a time range specified, there is no need to specify the recovery start time. The utility ignores the recovery start time, if specified, and assumes the backup start time. For the recovery end time, specify a time that falls after the backup end time.
- When restoring multiple individual RDAREAs updated by a single transaction with a time range specified, specify a time that falls after the transaction end time (synchronization point) for the recovery end time. An error results if the specified time falls before the transaction end time, in which case you need to specify the correct time (which falls after the transaction end time) again.
- The following shows an example of the pdrstr command specifying the -T option and the control statement file specifying the -T option in the -r option:
Command specification
pdrstr ...
-T X1,Y1
...
-f control-statement-file-1 |
Contents of control statement file 1
-r pduser1
-r pduser2 -T X2,Y2
-r pduser3 -T X3
-r pduser4 -T ,Y4 |
![[Figure]](figure/zu190046.gif)
- If the database recovery utility (pdrstr) is executed multiple times, make sure that the recovery start and end times of all related RDAREAs match. For details about related RDAREAs, see RDAREAs to be backed up together in the HiRDB Version 9 System Operation Guide.
(29) -z log-point-information-file-name
~<pathname>
When re-creating the log point information file, use this option to specify the name of the file. This file is created at the host where the pdrstr command is entered.
- Rules
- If specifying this option, you need to specify the backup file name with the -b option. This backup file must have been created by the pdcopy command specifying the -z option.
- For the log point information file name, specify an absolute path name beginning with the root (/). If the specified file already exists, the utility deletes this file before re-creating the log point information file.