HP NonStop SQL/MP Programming Manual for C—429847-008
8-1
8
Program Invalidation and Automatic
SQL Recompilation
Program Invalidation
A NonStop SQL program file can be valid or invalid. A valid program can run without
SQL recompilation using its current execution plans. An invalid program is subject to
SQL recompilation (depending on options such as the similarity check) because of
changes either to the program file itself or to an SQL object it references. An SQL
program file has these classifications of SQL validity:
The SENSITIVE flag in the program’s file label indicates whether the file is an SQL
program that has been successfully SQL compiled (although the program might be
invalid). The SENSITIVE flag also protects the program file from access by
Enscribe utilities.
The VALID flag in the program’s file label and in the PROGRAMS catalog table
indicates whether the program file can run without SQL recompilation.
SQL Compiler Validation Functions
The SQL compiler validates an SQL program file after a successful explicit SQL
compilation or after errors occurred during a compilation with the FORCE option
specified. During explicit compilation, the SQL compiler performs these functions
related to program validation:
Sets the VALID and SENSITIVE flags in the program’s file label
Records the timestamp of the SQL compilation in the program’s file label
Registers the program and sets the VALID flag in the PROGRAMS table
Creates entries in the USAGES table for any SQL objects (tables, views, indexes,
or collations) required by the program’s execution plans
For a list of all SQL compiler functions, see
Section 6, Explicit Program Compilation
.
To determine if an SQL program is valid, use the SQLCI VERIFY utility or the SQLCI
(or FUP) FILEINFO command with the DETAIL option. From a program, call the
FILE_GETINFOLIST_ or FILE_GETINFOLISTBYNAME_ system procedure and
specify item codes 82 and 83. Item code 82 indicates whether the file is an SQL
program (1=SQL program, 0=other), and item code 83 indicates whether the program
file is valid (1=valid, 0=invalid).
Summary of Contents for NonStop SQL/MP
Page 4: ......
Page 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Page 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Page 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...