SQL/MP Installation and Management Guide
Moving a Database
HP NonStop SQL/MP Installation and Management Guide—523353-004
9-2
Determining Move Dependencies
Determining Move Dependencies
The steps you take to move SQL objects or an entire database depend on the layout of
your database. The duplication process cannot ignore or overrule the dependency
requirements of database objects, described in earlier sections of this manual. The
complexity of the layout of your database dictates the complexity of the statements and
commands required to move the database.
Before moving a database, consider these issues:
•
What are the dependent SQL objects that might be affected by the move?
•
Does the moving plan consider the effect of the move on dependent objects or on
subsequent moves?
•
Does the plan include revalidation of the dependent programs?
•
Do you have the authority to move the objects and all the dependent objects?
•
Are the underlying tables, partitions, and systems available, as required?
•
What media are available and appropriate for the move?
•
Do you have sufficient disk space in the target locations?
•
How will the move affect the users of the database or the users of the application
programs?
•
Do you have a valid recovery mechanism for the new database scheme?
•
What steps must you take to ensure the consistency of the database during and
after the move?
•
Are you moving the objects from one SQL/MP release environment to another and
planning to upgrade the catalogs?
Choosing Utilities for the Move Operation
To move SQL objects, you must create copies of the objects at the new location. You
can create a copy of an SQL table, index, view, or an SQL program stored in a
Guardian file, with either the SQLCI DUP utility or the Guardian BACKUP and
RESTORE utilities. The SQLCI COPY and LOAD utilities also provide a mechanism for
moving SQL tables.
If you only need to rename a table, index, view, collation, or SQL program stored in a
Guardian file, you can use an SQLCI ALTER statement with the RENAME option to
rename the object. For more information, see Renaming Objects on page 7-36.
For SQL programs stored in an OSS file, use the appropriate OSS utility to move or
rename the program. For example, you can use the mv utility or the rename() api to
rename an OSS file. For more information about OSS utilities, see the Open System