SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide544536-007
12-25
Repairing Damaged SQL/MX Metadata and Objects
Repairing Damaged SQL/MX Metadata and
Objects
Each SQL/MX file consists of two physical Guardian files: the data fork and the
resource fork. Normally, when a data fork is dropped, DP2 automatically drops the
corresponding resource fork. In some cases, however, either a resource fork or a data
fork can become an orphan, requiring your intervention and repair.
SQL/MX database objects can sometimes become damaged and inoperative and
require repair. For example, a failed transaction might leave a file in the broken state; a
failed utility might leave the file corrupt or nonaudited; or a restore operation might
create a redefinition timestamp mismatch.
If a software defect creates a mismatch between the resource fork, the file labels, and
metadata, you might even need to repair the SQL/MX software. For example, if a disk
is lost and a table cannot be recovered, you might need to fix metadata manually.
Finally, it might become necessary to drop the actual labels associated with SQL/MX
objects, similar to using the GOAWAY feature supported by SQL/MP.
Topics in this subsection:
Strategies for Repairing Damaged Metadata and Objects on page 12-25
Identifying Problem Data and Objects on page 12-27
Using FIXUP to Correct Problem Data and Objects on page 12-32
Strategies for Repairing Damaged Metadata and Objects
Using the mxtool Utility
The mxtool utility provides an OSS command-line interface to various utility
operations, including FIXUP, GOAWAY, INFO, and VERIFY. Use mxtool to repair
damaged SQL/MX objects and metadata. For more information about mxtool and its
command syntax, see:
Section 5, Planning Database Security and Recovery
Section 8, Querying SQL/MX Metadata
The SQL/MX Reference Manual
FIXUP
Use the mxtool FIXUP command to perform limited repair operations that enable you
to fix problems, such as inconsistencies between metadata and labels, by adjusting the
label or resource fork. FIXUP does not repair all problems with inconsistencies,
however. For example, if the ANSI name does not match metadata, you cannot use
FIXUP. Instead, you must restore the file that contains the problem.