SQL/MX 3.x Installation and Management Guide (H06.22+, J06.11+)
Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide—640325-001
12-33
Using FIXUP to Correct Problem Data and Objects
While performing database operations, information between metadata, DP2 labels, and
resource forks can become inconsistent. For example, a failed TMF transaction might
leave a file in the broken state, or a software bug might not set the redefinition
timestamp correctly. When such an inconsistency is detected, it must be fixed to
guarantee proper execution of NonStop SQL/MX.
Options for repairing broken objects include:
•
A label repair operation, which enables you to change a select group of file
attributes for a partition or an object. Use this option to get a system back and
running without performing an expensive restore or TMF recover operation.
•
A metadata repair operation, which allows the super ID user to make explicit
metadata changes through UPDATE, DELETE, and INSERT statements on
metadata tables issued from a licensed MXCI process.
Recovering Consistent Files
When a disk volume or network node fails, files that are open at the time of failure are
left in a questionable state. In many cases, files are inconsistent because they were
actively involved in interrupted database transactions. In other cases, files marked as
questionable are actually consistent. These files, although open at the time of the
failure, were not actively taking part in database transactions.
In many cases, you know which files are actually corrupt and which are consistent.
Normally, it is better to allow the TMF file recovery method to recover all the files and
determine which are corrupt and which are not. See Recovering Files on page 12-2.
If you are able to determine that a file is not corrupt, you can simply reset the BROKEN
flag that indicates to the system that the file is corrupt. To reset this flag, use the
mxtool FIXUP utility.
Recovering a Broken Partition
The broken flag in a file label can be set by DP2 when it detects that something might
be wrong with a partition. After the problem with the partition is fixed, turn off the
broken flag to access the data. The ability to turn off the broken flag is equivalent to the
ALTER TABLE … RESETBROKEN command in SQL/MP.
To fix a broken file:
1. Turn off the audit bit.
2. Use TANDUMP to fix the problem.
3. Reset the broken flag.
4. Turn on the audit bit.
Correcting File Label Information
Use FIXUP to change these fields in SQL/MX file labels:










