RESTORE_VIEWS procedure

Restores all views in the specified schema which were previously saved with SAVE_VIEWS procedure.

Prototypes

RESTORE_VIEWS(ASCHEMA VARCHAR(128))
RESTORE_VIEWS()

Description

RESTORE_VIEWS is a utility procedure which restores the definition of all views in the specified schema from SAVED_VIEWS which were previously stored with SAVE_VIEW procedure or SAVE_VIEWS procedure. RESTORE_VIEWS also implicitly calls RESTORE_AUTH procedure to restore the authorization of the views. This is in contrast to inoperative views recreated with RECREATE_VIEWS procedure which lose authorization information.

Note

This procedure is effectively redundant as of DB2 9.7 due to the new deferred revalidation functionality introduced in that version.

Parameters

ASCHEMA
If provided, the schema containing the views to save. If omitted, this parameter defaults to the value of the CURRENT SCHEMA special register.

Examples

Restore the definition of all views in the FINANCE schema:

CALL RESTORE_VIEWS('FINANCE');

Restore the definition of all views in the current schema:

CALL RESTORE_VIEWS;