Backup and Restore 2 Manual
BRCOM RESTORE Command
Backup and Restore 2 Manual—522696-019
7-72
SQL/MX Restore Examples
For more information on target keyword, see Restoring an SQL/MX Object to a
Different Target. For example:
BR> RESTORE $tape01, MX (IND cat.sch.ind1, TGT TABLE
cat.sch.t1);
Restoring SQL/MX Index Partitions
To restore index partitions individually, specify the IPART option. For example:
Restore $tape01, mx (IPART cat.sch.i1 PARTITION (ipart5))
PARTONLY ON;
Restoring an SQL/MX Object to a Different Target
You can specify a target object to graft SQL/MX objects from tape to a different
SQL/MX object hierarchy on disk than the one the tape version originally came from.
To restore an object to a different target:
BR> RESTORE =mytape, MX (TABLE cat1.sch2.tab2, TGT SCHEMA
BR+> schema3);
As shown in Table 7-16, the schema is restored as a subordinate object of sch3 rather
than sch2.
You can also restore some objects to a different target and others to the same parent
object they were backed up from. For example:
BR> RESTORE =mytape, MX (CATALOG cat1, (TABLE cat2.sch1.tab1,
BR+> TGT SCHEMA cat3.sch1), (TPART cat1.sch2.tab2 PARTITION
BR+> (tpart5), TARGET SCH cat1.sch3.tab3), PARTONLY ON,)
BR+> INDEXES EXCLUDED, CONSTRAINTS EXCLUDED;
As shown in Table 7-17
:
The table sch1.tab1 and all its partitions backed up from schema cat2.sch1 are
restored to schema cat3.sch1.
The table partition TPART5 backed up from the table cat2.sch1.tab2 is restored to
table cat1.sch3.tab3.
Note. Before you issue the RESTORE command, the target object must already exist, or you
must create it.
Table 7-16. SQL/MX Object Restored to a Different Target
Catalog Schema Table
Table
Partition or
Index
Index
Partition Description
cat1.sch3 Subordinate table of
schema3