NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-75
Considerations—DUP
For example, suppose base table $A.A.TABLE has two dependent objects: a
protection view located on $A.XX.PVIEW and an index located on
$A.ZZ.IXTAB. To copy the base table and all dependent objects, you must use a
MAP NAMES option that includes all of the dependent objects. The following
MAP NAMES clause includes all three objects:
MAP NAMES ($A.A.* TO $D.A.*,
$A.XX.* TO $D.XX.*,
$A.ZZ.* TO $D.ZZ.* )
When changing the catalog of the base table, you must also use a complete
CATALOG mapping for all objects.
°
Duplicating shorthand views might produce unexpected results. For example,
the following command produces a view that is identical to the source, but
because the command does not specify naming patterns with wild-card
characters, DUP cannot map the named objects in the view definition:
DUP MGRLIST, MGRLIST2, VIEW EXPLICIT;
The following command does not work because DUP cannot map all of the
objects in the definition of the view MGRLIST to MGRLIST2:
DUP MGRLIST, MAP NAMES *.*.* TO MGRLIST2
The following command duplicates the view as intended (assuming that
MGRLIST references only EMP and DEPT, and that neither EMP nor DEPT is
partitioned or has indexes):
DUP (MGRLIST, EMP, DEPT),
MAP NAMES (MGRLIST TO MGRLIST2,
EMP TO EMP2,
DEPT TO DEPT2),
VIEW EXPLICIT;
°
To duplicate a table partitioned over multiple nodes, you must use the MAP
NAMES and CATALOGS clauses, and you must specify the remote nodes first
within each clause. (You must not specify the local node first because DUP
ignores a local node specification in these clauses and the resulting fileset
expression matches all nodes.)
For example, the following command duplicates the PARTS table, which is
partitioned over two nodes. \LOCAL is the node where the DUP command
executes and \REMOTE is the remote node. The PARTS table partitions are