SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-2
Unexpected Events That Can Invalidate a Program
These changes to SQL objects used by an SQL program file invalidate the program 
file:
•
Adding a constraint to a table used by the program
•
Adding a column or partition to a table used by the program (including an 
underlying table of a protection or shorthand view used by the program) unless the 
program is compiled with the CHECK INOPERABLE PLANS option and the table 
and any associated protection views have the similarity check enabled. (For more 
information about similarity checks, see Using Similarity Checks on page 10-15.)
•
Adding an index to a table used by the program, or to an underlying table of a 
protection or shorthand view used by the program, unless you specify the NO 
INVALIDATE option in the CREATE INDEX statement or unless the program is 
compiled with the CHECK INOPERABLE PLANS option and the table and any 
associated protection views have the similarity check enabled.
•
Changing a collation: dropping and then re-creating the collation, renaming a 
collation, or changing a DEFINE that points to a collation 
•
Executing the UPDATE STATISTICS statement unless you specify the 
NORECOMPILE option on tables used by the program or unless the program is 
compiled with the CHECK INOPERABLE PLANS option and the table and 
protection views referenced by the program have the similarity check enabled.
•
Dropping or doing a cleanup on a table or view 
•
Dropping a partition of a table or index unless the program is compiled with the 
CHECK INOPERABLE PLANS option and the table referenced by the program has 
the similarity check enabled
•
Dropping an index or constraint on a table
•
Restoring a table, including an underlying table of a protection or shorthand view, 
using the RESTORE program
•
Changing the PARTITION ARRAY type associated with the base table
To maintain valid programs, you need procedures that explicitly SQL compile affected 
programs after these listed operations occur. Otherwise, automatic recompilation 
occurs at run time. For more information, see Explicit Compilation
 on page 10-6 and 
Automatic Recompilation on page 10-7.
Unexpected Events That Can Invalidate a Program
Sometimes, object program files are created and appear to be valid but are not. These 
events can produce such a situation:
•
After an invalidating DDL change if the program’s catalog was available during the 
change but the object program file was not available
•
When a processor failure or other event destroys the SQL compiler process and its 
context after the compiler has produced the object file, has updated the SQL 










