Oracle Error ORA-32339: cannot alter materialized view with the PMOP

Oracle Error Message

ORA-32339: cannot alter materialized view with the PMOP

Reason for the Error

the materialized view is not allowed to have destructive PMOPS such as DROP, TRUNCATE and EXCHANGE (sub)partition. The UGA flag of i_am_a_refresh should be set first.

Solution

execute set_i_am_a_refresh first before alter materialized view with the PMOP.