Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

9.12.3 Moving the time back using method 2

To move the time back using method 2, follow the procedure described below.

Procedure
[Figure]
[Figure]
Note
The numbers on the left side of the process boxes correspond to the parenthesized numbers in the explanations below. For example, the operation in 3 is explained in (3).
Organization of this subsection
(1) Terminate HiRDB normally
(2) Actions to take when the data extraction facility of HiRDB Datareplicator is used (Part 1)
(3) Actions to take when message log files are displayed using the pdcat command
(4) Actions to take when statistical information has been acquired
(5) Actions to take before moving the time back
(6) Move back the system time
(7) Actions to take after the time is moved back
(8) Actions to take when the data extraction facility of HiRDB Datareplicator is used (Part 2)
(9) Start HiRDB normally
(10) Actions to take when the data extraction facility of HiRDB Datareplicator is used (Part 3)
(11) Actions to take when operation without unloading system log is used

(1) Terminate HiRDB normally

Execute the pdstop command to terminate HiRDB normally.

(2) Actions to take when the data extraction facility of HiRDB Datareplicator is used (Part 1)

Take the actions described below. Actions (b) and (c) can be taken in any order. For details about the HiRDB Datareplicator commands, see the HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide.

(a) After HiRDB Datareplicator has extracted all system logs, wait for all the extracted system logs to be reflected onto the target database

For details about how to check whether all system logs have been extracted and whether all system logs have been reflected, see Modifying the Configuration of the Source System in the HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide.

(b) Stop the data extraction facility of HiRDB Datareplicator

Execute the hdestop command to stop the data extraction facility of HiRDB Datareplicator.

(c) Stop the target Datareplicator

Stop the target Datareplicator. If the target Datareplicator is HiRDB Datareplicator, stop it using the hdsstop command.

(3) Actions to take when message log files are displayed using the pdcat command

(a) Execute the pdcat command and save the output results

Execute the pdcat command, redirect the output results, and save them in a file. This step saves the output messages in message log files ($PDDIR/spool/pdlog1,pdlog2) before the time is moved back. If local is specified for the pd_mlg_msg_log_unit operand in a HiRDB parallel server configuration, execute the pdcat command on all units.

If there is no need to reference the messages that were output before the time is moved back, you can skip this step.

(b) Delete the message log files

Use an OS command to delete the message log files ($PDDIR/spool/pdlog1,pdlog2). If local is specified for the pd_mlg_msg_log_unit operand in a HiRDB parallel server configuration, delete message log files from all units.

(4) Actions to take when statistical information has been acquired

Use an OS command to copy the statistics log files ($PDDIR/spool/pdstj1,pdstj2) to a different directory, and use an OS command to delete the statistics log files at the copy source. This step saves the statistics log files before the time is moved back. In the case of a HiRDB parallel server configuration, save the statistics log files of all units.

If there is no need to refer to the statistics log files before the time is moved back, you can skip this step.

(5) Actions to take before moving the time back

(a) Unload the system log files

Using the pdlogunld command, unload all system log files that are waiting to be unloaded. The system log files unloaded here are used to restore the database to the state it was in before the time was moved back, should an error occur in the database.

(b) Save the unload log files

In order to manage in different directories the unload log files collected before and after the time is moved back, use an OS command to copy the unload log files unloaded in Step (a) to a different directory, and then use an OS command to delete all unload log files at the copy source.

Note
If the unload log files collected before and after the time is moved back are in the same directory, the following phenomena might occur:
  • When you try to restore the database by specifying the unload log file directory, the database might be destroyed.
  • If the automatic log unloading facility is used, the path names of the created unload log files contain time information. Consequently, the unload log files are overwritten.

(6) Move back the system time

Move back the time in the OS settings. In the case of a HiRDB parallel server configuration, if the time differs among the individual server machines, tasks such as comparing messages become complicated. Therefore, synchronize the time of the individual servers.

(7) Actions to take after the time is moved back

(a) Back up all RDAREAs of the HiRDB system

Back up all RDAREAs of the HiRDB system. The backup files acquired here are used for restoring the database to the state it was in after the time was moved back, should an error occur in the database. The backup acquisition procedure is described below.

Using the database copy utility (pdcopy) to acquire backups
  1. Use the pdstart -r command to start HiRDB.
  2. Use the pdcopy command to back up all RDAREAs. If the differential backup facility is being used, add (S) to the end of the differential backup group name in the -g option.
  3. Use the pdstop command to terminate HiRDB normally.

Using a tool other than the database copy utility (pdcopy) to acquire backups
Use a tool other than the pdcopy command (the facility of another product) to back up all RDAREAs of the HiRDB system.
(b) Initialize the system log file

After the time has been moved back, if you use a system log file acquired before the time was moved back, HiRDB might malfunction. Therefore, initialize the system log file by performing the following procedure:

  1. Use the pdlogrm -d sys command to delete the system log file.
  2. Use the pdloginit -d sys command to re-create a system log file.
(c) Initialize the synchronization point dump files

Since HiRDB might malfunction for any of the following reasons, initialize the synchronization point dump files:

The procedure for initializing the synchronization point dump file is as follows:

  1. Use the pdlogrm -d spd command to delete the synchronization point dump file.
  2. Use the pdloginit -d spd command to re-create a synchronization point dump file.

(8) Actions to take when the data extraction facility of HiRDB Datareplicator is used (Part 2)

Take the actions described below. Actions (a) and (b) can be taken in any order.

(a) Initialize the data extraction facility of HiRDB Datareplicator

To ensure that the data extraction facility of HiRDB Datareplicator functions correctly after the time is moved back, use the hdestart -i command to initialize the data extraction facility of HiRDB Datareplicator.

(b) Initialize the target Datareplicator

Since the data extraction facility of HiRDB Datareplicator was initialized in Step (a), also initialize the target Datareplicator. If the target Datareplicator is HiRDB Datareplicator, initialize it using the hdsstart -i -q command.

(9) Start HiRDB normally

Use the pdstart command to start HiRDB normally.

(10) Actions to take when the data extraction facility of HiRDB Datareplicator is used (Part 3)

Take the actions described below. Actions (b) and (c) can be taken in any order.

(a) Re-create the extraction definition pre-process file of HiRDB Datareplicator

Since the data extraction facility of HiRDB Datareplicator was initialized in Step (8), use the hdeprep command to re-create the extraction definition pre-process file.

(b) Start the data extraction facility of HiRDB Datareplicator

Use the hdestart command to start the data extraction facility of HiRDB Datareplicator, which was stopped in Step (2) (b).

(c) Start the target Datareplicator

Start the target Datareplicator, which was stopped in Step (2) (c). If the target Datareplicator is HiRDB Datareplicator, start it using the hdsstart command.

(11) Actions to take when operation without unloading system log is used

To acquire a log point, execute the database copy utility (pdcopy) with the -z option specified and acquire backups of all RDAREAs. To acquire backups of all RDAREAs in a HiRDB parallel server configuration, you must execute the pdcopy command with the -z option specified on each server.