SQL/MP Installation and Management Guide
Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide—523353-004
11-5
Restoring Tables
This example restores a table including the dependent shorthand view, EMPSVIEW.
Shorthand views are restored only when they are explicitly named in the file set list.
RESTORE $TAPE, ($VOL1.PERSNL.EMPLOYEE, $VOL2.ADMIN.EMPSVIEW), &
CATALOG $VOL1.PERSNL, OPEN, TAPEDATE, LISTALL
The next example restores a table with a protection view from a backup operation
performed on another node and volume. To restore objects from another node onto
your node, you must specify the MAP NAMES option to map dependent source objects
(partitions, indexes, and protection views) to target objects. You must be careful to
define the MAP NAMES target file-set list correctly; if you specify an invalid mapping
scheme, the complete set of source objects might not be moved to the target objects.
For more information, see Choosing Utilities for the Move Operation on page 9-2.
In this example, the backup tape contains a table named EMPLOYEE (stored on the
$VOL1.PERSNL subvolume) and a protection view named EMPAUX (stored on the
$VOL1.PERSNAUX subvolume).
This RESTORE command illustrates how to map source objects with node names to
target objects with node names and source objects without node names to target
objects without node names:
RESTORE $TAPE, $VOL1.PERSNL.EMPLOYEE, NOUNLOAD, &
LISTALL, OPEN, AUDITED, AUTOCREATECATALOG ON, &
MAP NAMES (\CHI.$VOL1.PERSNL.* TO \DENV.$VOL7.PERSNL.*,
&
$VOL1.PERSNL.* TO $VOL7.PERSNL.*,&
\CHI.$VOL1.PERSNAUX.* TO
\DENV.$VOL7.PERSNAUX.*,
&
$VOL1.PERSNAUX.* TO
$VOL7.PERSNAUX.*),&
CATALOG ($VOL7.PERSNL FOR $VOL7.PERSNL.*, &
$VOL7.PERSNL FOR $VOL7.PERSNAUX.*)
The next example presents alternative syntax for accomplishing the tasks in the
previous example:
RESTORE $TAPE, $VOL1.PERSNL.EMPLOYEE, NOUNLOAD, &
LISTALL, OPEN, AUDITED, AUTOCREATECATALOG ON, &
MAP NAMES (\CHI.$*.*.* TO \DENV.$VOL7.PERSNL.*, &
$*.*.* TO $VOL7.PERSNL.*,&
\CHI.$*.*.* TO \DENV.$VOL7.PERSNAUX.*, &
$*.*.* TO $VOL7.PERSNAUX.*),&
CATALOG ($VOL7.PERSNL FOR $VOL7.PERSNL.*, &
$VOL7.PERSNL FOR $VOL7.PERSNAUX.*)