ORA-12034: materialized view log younger than last refresh

Sometimes, after some wrong deployment in the DB, I have encountered the error:

ORA-12034: materialized view log younger than last refresh

This error means that the table of the materialized view is not synchronized correctly.

The solutions to this are to either force a Complete refresh of the materialized view or to drop it and recreate it.

Solution 1: Drop and recreate all materialized views:
connect as sys to the Database
@Materialized_Views_Drop_Recreate_GENERATED.sql

Solution 2: Force a Complete Refresh:
BEGIN
dbms_mview.refresh(‘MV_PRODUCTS_EMP’, method => ‘C’, atomic_refresh => FALSE);
END;


Written by Nikos Minaidis
15/12/2021

Σχολιάστε