SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide—523723-004
12-23
Restoring Indexes
You can restore one or more table partitions, either implicitly, by restoring associated 
tables, or explicitly, by using the PARTITION restore object:
BR> RESTORE $tape-drive, MX (TPART cat1.sch1.table1 PARTITION 
(part1)), PARTONLY ON;
BR> RESTORE $tape-drive, MX (TPART cat1.sch1.table1 PARTITION 
(part1, part2))
BR+>, PARTONLY ON;
For more information about restoring tables and table partitions, see the Backup and 
Restore 2 Manual.
Restoring Indexes
Indexes cannot be restored explicitly. To restore all the indexes and index partitions in 
a catalog, schema, or table, restore the catalog, schema, or table. You can choose not 
to have table indexes restored by using the INDEXES EXCLUDED job option.
For more information about restoring indexes and index partitions, 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 information about MXCI OBEY command files, 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.
Caution. Exercise care when using the PARTONLY object in Backup and Restore 2 
operations for partitioned tables. It is possible to make the primary and secondary partitions of 
a table inconsistent, both with each other and with indexes (for example, by performing DML 
operations on only one of two backed up partitions before you restore both).










