NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-77
Examples—DUP
If a DUP operation fails after correctly duplicating some objects and files, restarting
the operation from the beginning causes errors unless the original operation used the
TARGET PURGE option. Determine the objects and files that were duplicated and
consider the appropriate setting for the TARGET option before you restart a
partially successful DUP operation.
If an unusual situation occurs while a collation is being duplicated, two temporary
files (ZZCLnnnn and ZZCSnnnn, where nnnn is a number) might be left in the same
subvolume as the source collation. You can purge both of these files with the
PURGE command.
Examples—DUP
The following command copies table $VOL1.PERSNL.JOB to subvolume
$NEWVOL.PERSNL and gives it the same name as the original table. The new
table will be described in the current default catalog because the CATALOG option
is not specified. The JOB table has no dependent objects.
>> DUP $VOL1.PERSNL.JOB, $NEWVOL.PERSNL.JOB LISTALL;
The following command does the same thing:
>> DUP $VOL1.PERSNL.JOB, $NEWVOL.*.* LISTALL;
The following command copies table $VOL1.PERSNL.JOB to the remote volume
\SYS2.$NEWVOL, using the same table name as the original. The CATALOG
option specifies a catalog on the remote node in which to describe the new table.
>> DUP $VOL1.PERSNL.JOB,\SYS2.$NEWVOL.PERSNL.JOB,
+> CATALOG \SYS2.$NEWVOL.CAT FOR \SYS2.$NEWVOL.PERSNL.JOB;
The following example copies a partitioned table, PARTLOC, that has a primary
partition on $VOL1 and secondary partitions and indexes on $WHS2 and $WHS3.
PARTLOC has an index, PARTIX, and a dependent protection view, PARTVW. The
example copies PARTLOC to subvolumes of the same name on three different
volumes, copying PARTIX and PARTVW also, because the default options
INDEXES IMPLICIT and VIEWS IMPLICIT apply.
>> DUP $VOL1.INVENT.PARTLOC, *.TESTINV.*;
DUPLICATED TABLE $VOL1.INVENT.PARTLOC TO
$VOL1.TESTINV.PARTLOC
PARTS (1, $WHS2 TO $WHS2,
2, $WHS3 TO $WHS3)
INDEX $VOL1.INVENT.PARTIX TO $VOL1.TESTINV.PARTIX
PVIEW $VOL1.INVENT.PARTVW TO $VOL1.TESTINV.PARTVW
The following example copies the partitioned table from the previous example to a
different node, \NEWSYS, using the MAP NAMES option. Objects on $VOL1 are
placed on $NVOL1, objects on $WHS2 are placed on $NVOL2, and objects on
$WHS3 are placed on $NVOL3. Subvolume and table names remain the same. The