Backup and Restore 2 Manual
BRCOM RESTORE Command
Backup and Restore 2 Manual—522696-019
7-64
SQL/MX Restore Examples
RESTORE $tape01, MX (table cat1.sch1.tab1, target schema
cat2.sch1), KEEPGFN ON, location ($data01 TO $System1 ,
$data02.ZSDSCH01.TPARTB00 TO $System02.ZSDSCH02.PARTTB00),
listall on, tapedisposition BOT;
The partition at $data02.ZSDSCH01.TPARTB00 will be restored to
$System02.ZSDSCH02.PARTTB00.
All partitions on volume $data01 will be restored to volume $system1. Guardian
physical file names of all partitions under $data01 will be retained as is in the
BACKUP-OBJECTS and subvolume name of the cat2.sch1 will be used.
The Guardian file names of remaining partitions will be retained as is in the backup
image under the subvolume name of the cat2.sch1.
Assume that the schema cat1.sch1 has two tables, table1 and table2 and the target
schema cat2.sch1 has one table, table1 and the cat1.sch1 is backed up.
To restore the schema cat1.sch1 to the target catalog cat2 with KEEP ON job option:
RESTORE $tape01, MX (schema cat1.sch1, target catalog cat2),
KEEP ON, KEEPGFN ON, listall on, tapedisposition bot;
The restore of table cat2.sch1.table1 will be skipped since the KEEP is ON and
cat2.sch1.table1 already exists. Hence, KEEPGFN has no impact on table
cat2.sch1.table1. However, cat2.sch1.table2 will be restored by retaining the Guardian
physical file names of BACKUP-OBJECTS.
Assume that the table cat1.sch1.tab1 has four table partitions, TPART0, TPART1,
TPART2, and TPART3 and the target table cat2.sch1.tab1 has only two partitions
TPART0 and TPART1.
To restore all the partitions under the table cat1.sch1.tab1 to the target table
cat2.sch1.tab1 using PARTONLY ON job option:
RESTORE $sa2, mx ( tpart cat1.sch1.tab1 partition ( TPART0 ,
TPART1, TPART2, TPART3 ), tgt table cat2.sch1.tab1 ) ,KEEPGFN
ON, PARTONLY ON, INDEXES EXCLUDED, CONSTRAINTS EXCLUDED,listall
on, tapedisposition bot;
As PARTONLY is ON, the Guardian file names of partitions
cat2.sch1.tab1.TPART0 and cat2.sch1.tab1.TPART1 are retained same as the
Guardian file names of partitions cat2.sch1.tab1.TPART0 and
cat2.sch1.tab1.TPART1 rather than the Guardian file names of partitions as is in
the BACKUP-OBJECTS and the subvolume name of cat2.sch1 will be used.
On restore, the Guardian file names of partitions cat2.sch1.tab1.TPART2 and
cat2.sch1.tab1.TPART3 are retained same as the BACKUP-OBJECTS and the
subvolume name of cat2.sch1 will be used.
To restore the schema cat1.sch1:
RESTORE $tape01, mx(schema cat1.sch1), listall on,
tapedisposition bot;