SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
M-26
Considerations—MODIFY LABEL with REPLACE
NODENUMBER
moved from \SYS2 to \SYS1. The database is left in an inconsistent state if
only these commands are run:
>> MODIFY LABEL $DBS.*.*
+> REPLACE NODENUMBER \SYS2 ($DBS) WITH \SYS1;
>> MODIFY CATALOG $DBS.CAT
+> REPLACE NODENAME \SYS2 ($DBS) WITH \SYS1;
One example of an inconsistency that exists is that the
\SYS1.$DB1.CAT.USAGES table will indicate that the USINGOBJNAME of the
index is \SYS2.$DBS.OBJECTS.I1, although $DBS is now on \SYS1.
Partitioned objects. Node numbers in the file labels of partitions of tables and
indexes are not modified unless those partitions are specified in the MODIFY
LABEL with REPLACE NODENUMBER command.
For a partitioned SQL object, each volume that contains a partition of the
object must be specified separately. MODIFY LABEL with REPLACE
NODENUMBER does not automatically modify information about all partitions
of a partitioned object.
It is the responsibility of the user to know how the database is distributed and
partitioned. Document the MODIFY commands that need to be run—and what
nodes they need to be run on—before they are needed. Prepare scripts that
run the necessary MODIFY commands. When you add a new dependent
object to the database, update the scripts.
While the system is in a consistent state, you can use the DISPLAY USE OF
command to locate dependent objects. After MODIFY commands have been
run, you can use the VERIFY utility to verify that the database is in a consistent
state.
While the system is in a consistent state, issue a SELECT from the PARTNS
partitions table to locate partitions. Prepare scripts that run the necessary
MODIFY commands. After MODIFY commands are run, use the VERIFY utility
to verify that the database is in a consistent state.
MODIFY LABEL with REPLACE NODENUMBER does not mark SQL object
programs as invalid in either the catalog or in the object program file label.
MODIFY LABEL with REPLACE NODENUMBER does not change the
redefinition timestamp in either the catalog or the file label.
DEFINE names can be used in programs to specify the names of catalogs, tables,
views, indexes, partitions, and other programs. The current DEFINE set at the time
the program is SQL compiled is saved in the object program file. If objects or
object programs specified by the DEFINEs are moved between the time that the
program is SQL compiled and the time that the program is run, the DEFINEs must
be changed to reflect the new location of the objects and object programs. This
instruction is true regardless of how the database was moved or whether the
MODIFY DICTIONARY utility was used to modify the node names and numbers.