VALIDATE bind option

The VALIDATE option determines whether to recheck, at run time, errors of the types "OBJECT NOT FOUND" and "NOT AUTHORIZED" that are found during bind or rebind.

Command option Option values Used with
VALIDATE
  • (RUN )
  • (BIND )
Note:
  1. The bind option is not valid for REBIND of packages for native SQL procedures or advanced triggers.

The option has no effect if all objects and needed privileges exist.

Option descriptions for VALIDATE

VALIDATE(RUN)
Indicates that if not all objects or privileges exist at bind time, the process issues warning messages, but the bind succeeds. Db2 checks existence and authorization again at run time for SQL statements that failed those checks during bind. The checks use the authorization ID of the plan or package owner.

If you specify the VALIDATE(RUN) bind option, and the application to be bound contains an error with a SET host-variable assignment statement, the bind process still issues only warning messages, not error messages.

VALIDATE(BIND)
Indicates that if not all objects or needed privileges exist at bind time, the process issues error messages, and does not bind or rebind the plan or package, with the following exceptions:
  • For BIND PACKAGE only, if you use the option SQLERROR(CONTINUE), the bind succeeds, but the SQL statements in it that have errors cannot execute.
  • Db2 might not resolve names for certain object types that are referenced in CREATE, ALTER, or DROP statements until execution time. That is, the bind process does not always detect an undefined name for a distinct type, function, JAR, mask, permission, procedure, role, sequence, sequence alias, trigger, trusted context, or variable.
  • Db2 does not check authorization for the LOCK TABLE statement and some CREATE, ALTER, and DROP statements until run time.

Default values for VALIDATE

Process Default value
BIND SERVICE RUN
BIND PLAN RUN
BIND PACKAGE RUN
REBIND PLAN Existing value
REBIND PACKAGE Existing value

Catalog records for VALIDATE

See the VALIDATE columns in SYSPACKAGE catalog table and SYSPLAN catalog table.