Saves the authorizations and definitions of all views in the specified schema for later restoration with RESTORE_VIEWS
.
SAVE_VIEWS(ASCHEMA VARCHAR(128))
SAVE_VIEWS()
SAVE_VIEWS is a utility procedure which saves the definition of all views in the specified schema to SAVED_VIEWS
. These saved definitions can then be restored with the RESTORE_VIEWS
procedure. SAVE_VIEWS also implicitly calls SAVE_AUTH
to preserve the authorizations of the views. This is in contrast to inoperative views recreated with RECREATE_VIEW
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.
Save the definition of all views in the FINANCE schema:
CALL SAVE_VIEWS('FINANCE');
Save the definition of all views in the current schema:
CALL SAVE_VIEWS;
- Source code
RESTORE_VIEWS
SAVE_VIEW
SAVE_AUTH
- SYSCAT.VIEWS (built-in catalogue view)