SQL/MP Installation and Management Guide

Moving a Database
HP NonStop SQL/MP Installation and Management Guide523353-004
9-31
Catalog Mapping Schemes for DUP
This DUP command uses a wild-card character for files in the source file-set list to
specify that all objects residing on $VOL1.PERSNL are to be duplicated to a new
volume. All the dependent objects also reside on $VOL1.PERSNL, so the MAP
NAMES specification can use the wild-card character to identify the target location for
all objects. All of the objects in this example are described in the catalog
$VOL2.PERSNL.
>> DUP $VOL1.PERSNL.*,
+> MAP NAMES ($VOL1.PERSNL.* TO $VOL2.PERSNL.*),
+> CATALOG ($VOL2.PERSNL FOR $VOL2.PERSNL.*);
This example is similar to the preceding example except that the objects identified by
the source file-set list $VOL1.PERSNL.* have dependent objects that reside on other
volumes. A mapping scheme must be specified that includes both the objects on
$VOL1.PERSNL and the dependent objects on $VOL3.PERSNL and $VOL5.PERSNL.
>> DUP $VOL1.PERSNL.*,
+> MAP NAMES ($VOL1.PERSNL.* TO $VOL2.PERSNL.*,
+> $VOL3.PERSNL.* TO $VOL4.PERSNL.*,
+> $VOL5.PERSNL.* TO $VOL6.PERSNL.*),
+> CATALOG ($VOL2.PERSNL);
This example shows a DUP command in which the source file-set list specifies a
qualified file-set list with the FROM CATALOG specification. All objects described in the
catalog $VOL1.PERSNL are to be duplicated to a new volume and described in a new
catalog on $VOL2. The source objects could reside anywhere on the node. This DUP
command must include a detailed MAP NAMES specification that identifies each
source object and its target location.
>> DUP (*.*.* FROM CATALOG $VOL1.PERSNL),
+> MAP NAMES ($VOL1.PERSNL.EMPLOYEE TO $VOL2.PERSNL.EMPLOYEE,
+> $VOL1.PERSNL.XEMPNAME TO $VOL2.PERSNL.XEMPNAME,
+> $VOL1.SALES.XEMPSLM TO $VOL2.SALES.XEMPSLM,
+> $VOL2.SALES.ORDREP TO $VOL4.SALES.ORDREP),
+> CATALOG ($VOL2.PERSNL FOR $VOL2.PERSNL.EMPLOYEE,
+> $VOL2.PERSNL FOR $VOL2.PERSNL.XEMPNAME,
+> $VOL2.PERSNL FOR $VOL2.SALES.XEMPSLM,
+> $VOL2.PERSNL FOR $VOL4.SALES.ORDREP);
The DUP command must specify a catalog for each object. If all objects in a
subvolume are described in one catalog, the command can use a simple file-set list for
each CATALOG specification. If objects residing in the same subvolume are described
in different catalogs, the command must use a CATALOG specification to identify a
catalog for each object. The target catalogs must exist when the DUP command
executes.
This example shows a DUP command in which the CATALOG specification is mapped
to a simple file-set list. All objects residing on $VOL2.PERSNL are to be described in
the same catalog.
>> DUP $VOL1.PERSNL.*,
+> MAP NAMES ($VOL1.PERSNL.* TO $VOL2.PERSNL.*),
+> CATALOG ($VOL2.PERSNL FOR $VOL2.PERSNL.*);