Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.63 KB

SAVE_VIEWS.rst

File metadata and controls

68 lines (44 loc) · 1.63 KB

SAVE_VIEWS procedure

Saves the authorizations and definitions of all views in the specified schema for later restoration with RESTORE_VIEWS.

Prototypes

SAVE_VIEWS(ASCHEMA VARCHAR(128))
SAVE_VIEWS()

Description

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.

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

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;

See Also