SQL/MP Installation and Management Guide

Moving a Database
HP NonStop SQL/MP Installation and Management Guide523353-004
9-19
Moving Tables
the ADMIN subvolume. The MAP NAMES option is used to define the target
subvolumes for each object source. The CATALOG option defines the new catalog for
each object.
The table and its dependent objects to be moved follow:
This DUP command moves these objects:
>> DUP $VOL1.PERSNL.EMPLOYEE,
+> MAP NAMES ($VOL1.PERSNL.* TO $VOL1.ADMIN.*,
+> $VOL2.PERSNL.* TO $VOL2.ADMIN.*)
+> CATALOG ($VOL1.ADMIN FOR $VOL1.ADMIN.EMPLOYEE,
+> $VOL1.ADMIN FOR $VOL1.ADMIN.EMPLIST,
+> $VOL2.ADMIN FOR $VOL2.ADMIN.XEMPNAME),
+> ALLOWERRORS ON;
This example demonstrates the use of the INDEXES OFF and VIEWS OFF options.
You can use these options to duplicate a table with dependent views and indexes
without automatically duplicating those dependent views and indexes.
>> DUP $VOL1.PERSNL.EMPLOYEE, $VOL1.ADMIN.*,
+> CATALOG $VOL1.ADMIN, INDEXES OFF, VIEWS OFF;
Examples of Using BACKUP and RESTORE to Move Tables
This example shows how to use BACKUP and RESTORE from an OBEY command
file on a single nonaudited table with no dependent objects. BACKUP writes the table
to tape. RESTORE moves the table from one subvolume to another and describes it in
a new catalog.
BACKUP $TAPE, $VOL1.PERSNL.MANAGERS, LISTALL
RESTORE $TAPE, $VOL1.PERSNL.MANAGERS,&
MAP NAMES ($VOL1.PERSNL.MANAGERS TO $VOL1.ADMIN.MANAGERS),&
CATALOG ($VOL1.ADMIN FOR $VOL1.ADMIN.MANAGERS),&
TAPEDATE, LISTALL
This example shows how to use BACKUP and RESTORE from an OBEY command
file on an audited table with dependent objects that reside on different volumes. You
must use the MAP NAMES option to map the dependent objects correctly to new
subvolumes. You must also use the CATALOG option to specify the new catalog for
each object.
EMPLOYEE A table that resides on $VOL1.PERSNL, described in the catalog
$VOL1.PERSNL
EMPLIST A protection view that resides on the same subvolume, described
in the same catalog as its underlying table, EMPLOYEE
XEMPNAME An index that resides on $VOL2.PERSNL, described in the catalog
$VOL2.PERSNL