HP NonStop SQL/MP Programming Manual page 134

For c
Table of Contents

Advertisement

Explicit Program Compilation
sensitive and SQL valid. The program retains its existing execution plans. If the
program was not previously SQL compiled, the operation fails with SQL error 2115.
The CATALOG option is the only other SQLCOMP option you can specify with the
REGISTERONLY ON option. If you specify an option other than CATALOG, the
operation fails with SQL error 2111. If the program was previously compiled with
the NOREGISTER ON option, the operation fails with SQL error 2108. If the
program was modified by the Binder program after it was SQL compiled, the
operation fails with SQL error 2103.
REGISTERONLY OFF (the default) directs the SQL compiler to explicitly compile
the program and perform all SQL compiler functions.
NOREGISTER { ON | OFF }
directs the SQL compiler to compile a program without registering the program in a
catalog. To use the NOREGISTER option, you must have an SQL/MP software
version of 310 (or later).
NOREGISTER ON directs the SQL compiler to explicitly compile the program but
not to register it in a catalog. The SQL compiler does not mark the program as
SQL sensitive and SQL valid in its file label. Therefore, the program file can be
executed without being registered in an SQL catalog. If you specify the CATALOG
option with the NOREGISTER ON option, the compilation fails with SQL error
2116. If the program is already registered in a catalog, the compilation fails with
SQL error 2110. If the program was modified by the Binder program after it was
SQL compiled, the operation fails with SQL error 2103.
NOREGISTER OFF (the default) directs the SQL compiler to explicitly compile the
program and perform all specified compiler functions, including registering the
program in the catalog.
CHECK { INVALID PROGRAM | INVALID PLANS | INOPERABLE PLANS }
determines the behavior of the SQL executor when it runs an invalid SQL
statement or a statement that references a DEFINE that has changed since the
last explicit SQL compilation.
To use a CHECK option, you must have an SQL/MP software version of 310 (or
later). A version 310 SQL compiler sets the program's file version (PFV) to 310.
If you specify the CHECK INVALID PLANS or CHECK INOPERABLE PLANS
option (which stores similarity information in the program file), the SQL compiler
also sets the program's catalog version (PCV) to 310 (or later). To support the
CHECK INVALID PLANS or CHECK INOPERABLE PLANS option, an SQL catalog
must have a catalog version of 310 (or later).
If you restore a program using the SQLCOMPILE option, the RESTORE program
invokes the recompilation of the program by using the SQLCOMP CHECK option
specified during the last explicit SQL compilation.
HP NonStop SQL/MP Programming Manual for C—429847-008
Running the SQL Compiler in the Guardian
6-18
Environment

Advertisement

Table of Contents
loading

Table of Contents