Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.13.10 Operation when an error occurs

Organization of this subsection
(1) Rollback when an error occurs
(2) Recovery procedure when data not satisfying the post-splitting storage condition remains

(1) Rollback when an error occurs

If processing terminates abnormally during execution of ALTER TABLE, no recovery operation is required because the table changes are rolled back. You can simply re-execute ALTER TABLE.

However, once execution of ALTER TABLE has been completed, RDAREA data might have been deleted. Therefore, you cannot restore the system to its status before execution of ALTER TABLE if you did not make backup.

For this reason, it is important to make a backup in advance of performing any of these operations so that the system can be restored from the backup if necessary. You should make a backup of the following:

(2) Recovery procedure when data not satisfying the post-splitting storage condition remains

If WITHOUT PURGE was wrongly specified, data might remain that does not match the storage conditions after splitting. In such a case, data retrieval operations on the basis of a partitioning key might not be possible and might terminate in an error. The following figure shows an example of the recovery procedure when data not satisfying the post-splitting storage condition remains. This example shows the recovery procedure when data that should have been stored in R04 remains instead in R03.

Figure 13-87 Example of the recovery procedure when data not satisfying the post-splitting storage condition remains

[Figure]

Note: The numbers in the figure (1 through 4) correspond to the numbers in the following procedure.

Procedure
  1. Unload the table data from the RDAREA into which the incorrect data is stored, and save it in a format that can be used as the input to the database load utility.
  2. Unload the table data from the RDAREA into which the data should have been stored, and save it in a format that can be used as the input to the database load utility.
  3. Using the unload data file created in step 1 as the input file, execute the database load utility in the creation mode for the RDAREA that stores the wrong data on an RDAREA-by-RDAREA basis.
    Because the unload data file contains data that does not match the split storage conditions, data error information is output. If you do not need the data error information, you can suppress its output by specifying divermsg=off in the option statement.
  4. Using the unload data files created in steps 1 and 2 as the input files, execute the database load utility in the creation mode for the RDAREAs that should have stored the data on an RDAREA-by-RDAREA basis.
    Because the unload data files contain data that does not match the split storage conditions, data error information is output. If you do not need the data error information, you can suppress its output by specifying divermsg=off in the option statement.