DB2 10.5 for Linux, UNIX, and Windows

Automatic revalidation of database objects

Automatic revalidation is a mechanism whereby invalid database objects are automatically revalidated when accessed at run time.

A database object usually depends upon one or more different base objects. If the status of base objects on which the database object depends upon change in any important way, such as the base object being altered or dropped, the dependent database object becomes invalid. Invalid database objects must be revalidated before they can be used again. Revalidation is the process by which the DB2 software reprocesses the definition of an invalid dependent object so that the object is updated with the current state of its base objects, thereby turning the invalid dependent object back into a usable, valid object. Automatic revalidation is a mechanism whereby invalid database objects are automatically revalidated when accessed at run time.

In general, the database manager attempts to revalidate invalid objects the next time that those objects are used. Automatic revalidation is enabled through the auto_reval configuration parameter. By default, this configuration parameter is set to DEFERRED, except for databases upgraded from Version 9.5 or earlier, in which case auto_reval is set to DISABLED.

For information about the dependent objects that are impacted when an object is dropped, and when those dependent objects are revalidated, see DROP statement.

The following list shows the data definition language (DDL) statements for which automatic revalidation is currently supported:
  • ALTER MODULE DROP FUNCTION
  • ALTER MODULE DROP PROCEDURE
  • ALTER MODULE DROP TYPE
  • ALTER MODULE DROP VARIABLE
  • ALTER NICKNAME (altering the local name or the local type)
  • ALTER TABLE ALTER COLUMN
  • ALTER TABLE DROP COLUMN
  • ALTER TABLE RENAME COLUMN
  • CREATE OR REPLACE ALIAS
  • CREATE OR REPLACE FUNCTION
  • CREATE OR REPLACE NICKNAME
  • CREATE OR REPLACE PROCEDURE
  • CREATE OR REPLACE SEQUENCE
  • CREATE OR REPLACE TRIGGER
  • CREATE OR REPLACE VARIABLE
  • CREATE OR REPLACE VIEW
  • DROP FUNCTION
  • DROP NICKNAME
  • DROP PROCEDURE
  • DROP SEQUENCE
  • DROP TABLE
  • DROP TRIGGER
  • DROP TYPE
  • DROP VARIABLE
  • DROP VIEW
  • RENAME TABLE

You can use the ADMIN_REVALIDATE_DB_OBJECTS procedure to revalidate existing objects that have been marked invalid.

Attention: Automatic revalidation of sourced routines, and External Java and C routines are not supported. It is required that you drop and re-create these types of routines if they become invalid.