PMO
Rajeshwaran, Jeyabal, December 24, 2015 - 6:16 am UTC
Other option would be partition maintenance operation.
rajesh@ORA11G>
rajesh@ORA11G> alter table t truncate partition p2;
Table truncated.
rajesh@ORA11G>
rajesh@ORA11G> select object_name,object_type,status
2 from user_objects
3 where object_name ='T_MV';
OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------- -------
T_MV TABLE VALID
T_MV MATERIALIZED VIEW INVALID
2 rows selected.
rajesh@ORA11G>
rajesh@ORA11G> alter materialized view t_mv compile;
Materialized view altered.
rajesh@ORA11G> select object_name,object_type,status
2 from user_objects
3 where object_name ='T_MV';
OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------- -------
T_MV TABLE VALID
T_MV MATERIALIZED VIEW VALID
2 rows selected.
rajesh@ORA11G> alter table t add partition p3;
Table altered.
rajesh@ORA11G> select object_name,object_type,status
2 from user_objects
3 where object_name ='T_MV';
OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------- -------
T_MV TABLE VALID
T_MV MATERIALIZED VIEW INVALID
2 rows selected.
rajesh@ORA11G>
MV imp from DMP doesnt copy the Timed refresh criteria
Udit Vardhan, November 16, 2017 - 6:47 pm UTC
we implemented the timed refresh on one of or MVs. when we create DMP from this env to refresh lower environments, expdp process somehow leaves refresh criteria. resulting in MV that doesn't refresh itself and we end up modifying view to alter with the refresh condition to refresh in every five minutes.
any suggestions ??
using 11gR2, refresh condition as below that is not copied in DMP imports-
REFRESH FORCE ON DEMAND START WITH sysdate + 0 NEXT SYSDATE + 1/288
November 20, 2017 - 1:50 am UTC
We'd need to see a full test case.