SQL/MP Installation and Management Guide

Moving a Database
HP NonStop SQL/MP Installation and Management Guide523353-004
9-20
Moving Tables
The table and dependent objects to be moved follow:
These commands accomplish the move operation:
BACKUP $TAPE, $VOL1.PERSNL.EMPLOYEE, AUDITED,LISTALL
RESTORE $TAPE, *.*.*,
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),&
AUDITED, TAPEDATE, LISTALL
Examples of Using LOAD or COPY to Move a Table
The next two examples compare using LOAD and COPY in moving SQL tables and
dependent objects.
The table and its dependent objects follow:
The first example shows how to create the appropriate dependent structure so that
dependent objects are loaded correctly with the table. The CREATE TABLE and
CREATE INDEX operations precede the load. Auditing of the table is disabled before
the LOAD operation and enabled after the LOAD operation. The SLACK option of the
LOAD command specifies the amount of empty space in the block structure. Because
a view is only a definition and does not require loading, you could create the view
EMPLIST either before or after the LOAD operation.
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
XEMPNAME An index that resides on $VOL2.PERSNL, described in the catalog
$VOL2.PERSNL
EMPLOYEE A table that resides in $OLD.PERSNL, described in the catalog
$OLD.PERSNL
EMPLIST A protection view that resides in the same subvolume, described in
the same catalog as its underlying table, EMPLOYEE
XEMPNAME An index that resides in $OLD2.PERSNL, described in the catalog
$OLD2.PERSNL