Restores all views in the specified schema which were previously saved with SAVE_VIEWS
.
RESTORE_VIEWS(ASCHEMA VARCHAR(128))
RESTORE_VIEWS()
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
or SAVE_VIEWS
. RESTORE_VIEWS also implicitly calls RESTORE_AUTH
to restore the authorization of the views. This is in contrast to inoperative views recreated with RECREATE_VIEWS
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.
- ASCHEMA
If provided, the schema containing the views to save. If omitted, this parameter defaults to the value of the CURRENT SCHEMA special register.
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;
- Source code
SAVE_VIEWS
RESTORE_VIEW
RESTORE_AUTH
- SYSCAT.VIEWS (built-in catalogue view)