What is the purpose of the REGENERATE VIEWS analysis option?
Release:
Component: RCM, RCC
The REGENERATE VIEWS Analysis option is available on ALTER and COMPARE Strategies. The valid values are Y or N.
RMA12 20.0 RC/M ICL/Alter/Compare Strategy Analysis Options
COMMAND ===>
Enter SAVE to save settings. END to return. "?" in field for field level help.
CONTROL OPTIONS UTILITY OPTIONS OUTPUT LISTING OPTIONS
SECURITY ==> N STATS (Y,N,S,A) ==> N ANALYSIS HEADER ==> Y
DEFAULT SQLID ==> (S & A SQL stats are from IMPACT ANALYSIS ==> Y
ALIAS SQLID ==> original unchanged obj) RPT IN DDLFILE ==> Y
DROP & RE-CREATE ==> N CHECK DATA ==> N
REGENERATE VIEWS ==> Y IMAGE COPY (Y,P,N) ==> N DATASET DELETE OPTIONS
MQT REFRESH ==> N (B)IND/(R)EBIND ==> N UNLOAD ==> Y
SET TERMINATOR ==> ; REORG TS,IX,B,N ==> N TEMPORARY ==> Y
(blank defaults to ';') REBUILD INDEX ==> N
DATA UNLOAD OPTIONS MODEL OPTIONS
ALL ROWS ==> Y MODEL ID ==> @DEFAULT IDCAMS OPTIONS
NUMBER ROWS ==> MODEL CREATOR ==> USER01 VSAM DEFINES ==> N
DATA STATISTICS ==> N UPDATE MODEL ==> N VSAM DELETES ==> N
TRUNCATE ==> N
EXCLUSIVE OPTIONS
NO .AUTHS ==> Y
SQL ONLY ==> N
COMMIT ASAP ==> N ( If SQL only specified )
If the data type, length, precision, or scale for a column is altered, all the views which are dependent on the altered table are checked to make sure they are still valid. When the view is referenced in the future, DB2 requires additional resources to verify the view is still valid since it was not REGENERATE’d during the table-column alteration.
Using REGENERATE Y will cause an ALTER VIEW view-name REGENERATE to be generated. This will occur for the base views and views on the base views. This saves the internal structure of the view after an ALTER TABLE, therefore DB2 will not need to check the validity of the view when it is referenced in the future.
Documentation can be found under: Analysis Options