SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
To restore one or more index partitions, restore the associated indices implicitly or use the PARTITION
restore object explicitly:
BR> RESTORE $tape-drive, MX (IPART cat1.sch1.index1 PARTITION(part1)), PARTONLY ON;
BR> RESTORE $tape-drive, MX (IPART cat1.sch1.index1 PARTITION(part1, part2))
BR+>, PARTONLY ON;
For more information, see the Backup and Restore 2 Manual.
Using SHOWDDL
When SHOWDDL is turned ON during a restore operation, the RESTORE command writes to an
OSS EDIT file the DDL for each CREATE statement that has executed. You can modify the EDIT files
to be used as MXCI OBEY command files to regenerate these SQL/MX objects that cannot be
backed up or restored directly:
• Referential integrity constraints
• SPJs
• Triggers
• Views
For more information, see the SQL/MX Reference Manual.
To use the EDIT files as MXCI OBEY command files, you must first modify them slightly. You must
qualify the locations of objects specified in each CREATE command to indicate the catalog and
table associated with the object. EDIT files generated by RESTORE are named SHOWDDLn, where
n is set to the value 1 initially and then incremented when the current file becomes full and a new
file is created.
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” (page 254)
• “Identifying Problem Data and Objects” (page 255)
• “Using FIXUP to Correct Problem Data and Objects” (page 259)
Repairing Damaged SQL/MX Metadata and Objects 253










