NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
P-29
Program Invalidation
CLEANUP table, DROP TABLE, or PURGE table
CLEANUP view, DROP VIEW or PURGE view
DROP CONSTRAINT
Performing any of the following operations on an object used by a program invalidates a
registered program unless the program was compiled with the CHECK INOPERABLE
PLANS option and the object being operated on has similarity checks enabled
(explicitly for tables and views, implicitly for other objects):
ALTER TABLE ADD COLUMN
ALTER TABLE ADD PARTITION
ALTER TABLE DROP PARTITION
ALTER TABLE MOVE
ALTER INDEX DROP PARTITION
ALTER INDEX MOVE
CREATE CONSTRAINT
CREATE INDEX
UPDATE STATISTICS with the RECOMPILE OPTION
These operations invalidate specific execution plans within a program even when they
do not invalidate the program as a whole. (SQL detects the invalid plans at program
execution time by comparing an object's current redefinition timestamp to its compile-
time redefinition, then performs similarity checks at that time to determine if the plan
requires recompilation.)
Host language compiling, binding, or accelerating a registered SQL program deletes it
from the catalog it is registered in if the new version of the program is written to the
same object file that held the previous version. You must re-SQL-compile the program
to reregister it and make it a valid SQL program.
An unregistered SQL program is technically neither valid nor invalid because SQL does
not maintain information about its validity in the file label of the program file or in the
PROGRAMS catalog table. Both sets of operations listed earlier in this entry invalidate
specific execution plans within an unregistered program, however.