NonStop NS-Series Database Migration Guide

Migrating an SQL/MP or SQL/MX Database
HP Integrity NonStop NS-Series Database Migration Guide540469-001
2-13
Steps for Moving an SQL/MP Database by Using
ALTER TABLE MOVE and ALTER INDEX MOVE
If the catalog version is less than 350, you might need to install the latest SQL/MP
software before issuing an UPGRADE CATALOG command on the source system.
For more information, see the SQL/MP Reference Manual and the SQL/MP
Installation and Management Guide.
2. On the source system, list the partitions in each catalog of the database by issuing
a FILEINFO DETAIL command in SQLCI and record the results in a log file:
>>log mysubvol.mypartns;
>>fileinfo \TNSR.$samdb.invent.*, detail;
You can query the PARTNS tables in the SQL/MP catalogs to list only the
partitions. However, the SQLCI FILEINFO DETAIL command might be easier to
use, particularly when partitions are split across catalogs.
3. On the destination system, create the SQL/MP catalogs of your database by
issuing CREATE CATALOG statements from an SQLCI OBEY command file:
CREATE CATALOG \TNSE.$dskvol.invent;
...
4. In an SQLCI OBEY command file, write ALTER TABLE MOVE statements for each
partition of a table and ALTER INDEX MOVE statements for its associated indexes
in the SQL/MP database:
ALTER TABLE \TNSR.$samdb3.invent.partloc
MOVE TO \TNSE.$samdb3.invent.partloc
CATALOG \TNSE.$dskvol.invent
WITH SHARED ACCESS
COMMIT AFTER 02:00
TIMEOUT NEVER
ONCOMMITERROR COMMIT BY REQUEST;
ALTER TABLE \TNSR.$samdb2.invent.partloc
MOVE TO \TNSE.$samdb2.invent.partloc
CATALOG \TNSE.$dskvol.invent
WITH SHARED ACCESS
COMMIT AFTER 02:00
TIMEOUT NEVER
ONCOMMITERROR COMMIT BY REQUEST;
ALTER TABLE \TNSR.$samdb.invent.partloc
MOVE TO \TNSE.$samdb.invent.partloc
CATALOG \TNSE.$dskvol.invent
WITH SHARED ACCESS
COMMIT AFTER 02:00
TIMEOUT NEVER
ONCOMMITERROR COMMIT BY REQUEST;
...
ALTER INDEX \TNSR.$samdb.invent.xsuppnam
MOVE TO \TNSE.$samdb.invent.xsuppnam
CATALOG \TNSE.$dskvol.invent
WITH SHARED ACCESS
COMMIT AFTER 02:00
TIMEOUT NEVER