SQL/MP Installation and Management Guide

Moving a Database
HP NonStop SQL/MP Installation and Management Guide523353-004
9-26
Example of Moving a Database
Example 9-1. Example of Moving the Sample Database (page 1 of 5)
1. Determine the name of the SQL catalogs involved in this move by querying
the CATALOGS table. You should always log the commands and information
returned in the move operations.
>> LOG log-file CLEAR;
>> SELECT CATALOGNAME FROM $SYSTEM.SQL CATALOGS;
CATALOGNAME
-------------------------
\SYS1.$DATA.INVENT
\SYS1.$DATA.PERSNL
\SYS1.$DATA.SALES
2. Determine the names of the SQL objects involved in this move. The TABLES
catalog table can be queried to obtain a list of tables. In the case of
the sample database, the TABLECODE for the application tables is 0. This
table code might not always be applicable.
>> SELECT TABLENAME FROM INVENT.TABLES
+> WHERE TABLECODE = 0;
TABLENAME
----------------------------------
\SYS1.$DATA.INVENT.ERRORS
\SYS1.$DATA.INVENT.PARTLOC
\SYS1.$DATA.INVENT.PARTSUPP
\SYS1.$DATA.INVENT.SUPPLIER
\SYS1.$DATA.INVENT.VIEW207
--- 5 row(s) selected.
>> SELECT TABLENAME FROM PERSNL.TABLES
+> WHERE TABLECODE = 0;
TABLENAME
----------------------------------
\SYS1.$DATA.PERSNL.DEPT
\SYS1.$DATA.PERSNL.EMPLIST
\SYS1.$DATA.PERSNL.EMPLOYEE
\SYS1.$DATA.PERSNL.JOB
\SYS1.$DATA.PERSNL.MGRLIST
--- 5 row(s) selected.
>> SELECT TABLENAME FROM SALES.TABLES
+> WHERE TABLECODE = 0;
TABLENAME
----------------------------------
\SYS1.$DATA.SALES.CUSTLIST
\SYS1.$DATA.SALES.CUSTOMER
\SYS1.$DATA.SALES.ODETAIL
\SYS1.$DATA.SALES.ORDERS
\SYS1.$DATA.SALES.ORDREP
\SYS1.$DATA.SALES.PARTS
--- 6 row(s) selected.