NonStop NS-Series Database Migration Guide
Migrating an SQL/MP or SQL/MX Database
HP Integrity NonStop NS-Series Database Migration Guide—540469-001
2-14
Steps for Moving an SQL/MP Database by Using
ALTER TABLE MOVE and ALTER INDEX MOVE
ONCOMMITERROR COMMIT BY REQUEST;
...
The WITH SHARED ACCESS option allows concurrent DML operations on the
database object during most of the move. During the commit phase, the ALTER
TABLE MOVE statement requires exclusive access to all partitions of the database
object and destroys opens from applications that attempt DML operations on the
database object. To schedule the commit phase and handle retryable errors,
reducing rollback and increasing the availability of applications that use the moved
database objects, use the COMMIT option. For more information, see the SQL/MP
Reference Manual.
5. In another SQLCI OBEY command file, write ALTER TABLE MOVE statements for
the partitions of another table and ALTER INDEX MOVE statements for its
associated indexes in the SQL/MP database.
6. On the source system, issue the OBEY command files that contain ALTER TABLE
MOVE and ALTER INDEX MOVE statements in SQLCI. For example, these OBEY
command files move database objects, including any protection views, in the
INVENT, SALES, and PERSNL schemas:
>>OBEY INVENT;
>>OBEY SALES;
>>OBEY PERSNL;
...
7. On the destination system, re-create shorthand views if they existed on the source
system. You can start creating the shorthand views after at least one partition of
the underlying database object has been moved to the destination system.
8. On the destination system, verify the success of the migration by issuing a
FILEINFO DETAIL command in SQLCI for each SQL/MP catalog, and record the
results in a log file:
>>log mysubvol.mypartns;
>>fileinfo \TNSE.$dskvol.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.
9. On the destination system, set the class MAP DEFINEs and create the SQL/MP
aliases if they existed on the source system. For more information, see the
SQL/MX Reference Manual.
10. On the destination system, update the statistics of the tables by issuing an
UPDATE STATISTICS statement in MXCI for SQL/MX applications and by issuing
an UPDATE STATISTICS statement in SQLCI for SQL/MP applications. For more
Note. To speed up migration, move partitions of different SQL/MP database objects by
issuing SQLCI OBEY command files in parallel. Partitions and indexes of the same
SQL/MP database object must be moved serially.