SQL/MP Installation and Management Guide
Moving a Database
HP NonStop SQL/MP Installation and Management Guide—523353-004
9-30
Catalog Mapping Schemes for DUP
Catalog Mapping Schemes for DUP
The structure of the MAP NAMES and CATALOG clauses of the DUP command 
depend on the structure of database dependencies. You can use the DISPLAY USE 
OF command or queries of catalog tables to determine the dependencies. These 
guidelines apply:
•
The current location of the objects determines the source file-set list for the DUP 
command.
•
The source and target locations of objects to be moved determines the MAP 
NAMES layout.
•
For the DUP command to automatically duplicate all the dependent objects, the 
source file-set list must include all tables to be duplicated or all subvolumes that 
contain these tables.
The DUP command must specify a valid mapping scheme for each object listed in the 
file set list and all the dependencies of the objects listed; these objects will be 
automatically duplicated. You must analyze the output of the DISPLAY USE OF utility 
to determine whether the mapping scheme will identify a valid source to target 
mapping scheme for all objects. An invalid mapping scheme causes errors, invalid 
dependent objects, or objects that are not moved.
These examples explain the relationship between the database layout as produced by 
the DISPLAY USE OF utility and the layout specified in the DUP command.
7. SQL compile the programs.
 To validate the programs, you should explicitly SQL compile them with the
 DEFINEs pointing to the new location of the tables and views. The
 following commands demonstrate setting the new DEFINEs and compiling a
 set of SQL programs that run in the Guardian environment. The sample
 database programs reside in the SAMPDB subvolume.
SET DEFINE CLASS CATALOG
ADD DEFINE =INVENT , SUBVOL $DATA1.INVENT
SET DEFINE CLASS MAP
ADD DEFINE =PARTS , FILE $DATA1.SALES.PARTS
ADD DEFINE =SUPPLIER, FILE $DATA1.INVENT.SUPPLIER
ADD DEFINE =PARTSUPP, FILE $DATA1.INVENT.PARTSUPP
VOLUME $DATA1.SAMPDB
SQLCOMP /IN OBJ205, OUT $S.#HOLD / CATALOG =INVENT,
 EXPLAIN DEFINES
SQLCOMP /IN OBJ206, OUT $S.#HOLD / CATALOG =INVENT,
 EXPLAIN DEFINES
8. Make new TMF online dumps of all restored audited objects.
Example 9-1. Example of Moving the Sample Database (page 5 of 5)










