ALLBASE/SQL Reference Manual (36216-90216)
Chapter 12 593
SQL Statements S - Z
VALIDATE
STATISTICS, since UPDATE STATISTICS will invalidate stored sections. If you issue
both statements during a period of low activity for the DBEnvironment, the optimizer
will have current statistics on which to base its calculations, with minimal performance
degradation.
• A temporary section cannot be validated.
• Users can specify the access plan of a query with the SETOPT statement. To validate a
module or procedure without the user-specified access plan, include the DROP
SETOPTINFO keyword in the VALIDATE statement. The default access plan determined
by ALLBASE/SQL is stored in the system catalog instead.
• If a module or procedure cannot be validated, ALLBASE/SQL returns an error.
• If a section is still invalid after revalidation, the module is considered invalid.
• To find the names of procedures with invalid sections, use ISQL to query the
SYSTEM.SECTION view with Stype = 0.
• The VALIDATE statement will not revalidate sections that have been stored prior to this
release, for example, sections that have been migrated from a previous release. These
sections can only be revalidated by running the application to execute all the sections.
An alternative is to recreate the module by preprocessing the application again.
Thereafter, you can use the VALIDATE statement.
• For detailed information on modules refer to the section "Invalidation and Revalidation
of Sections" in the "Maintenance" chapter of the ALLBASE/SQL Database
Administration Guide and the "Using the Preprocessor" chapter in your ALLBASE/SQL
application programming guide.
• For detailed information on procedures, refer to Chapter 4 , “Constraints, Procedures,
and Rules.”
• When the WITH AUTOCOMMIT clause is used, a COMMIT WORK statement is executed
automatically after each MODULE or PROCEDURE is validated. This can reduce both
log space and shared memory requirements for the VALIDATE command.
• When the FORCE clause is used, all sections associated with the MODULE or
PROCEDURE are revalidated, regardless of whether they are valid or invalid.
• When the FORCE clause is used with VALIDATE ALL MODULES and VALIDATE
ALL PROCEDURES, every stored section in the database is forced to recompile using
the latest release. These statements have essentially the same effect as preprocessing
every program again that uses the database.
Authorization
You can execute this statement if you have OWNER or RUN authority on a module or you
have OWNER or EXECUTE authority for a procedure or if you have DBA authority.