Oracle Error QSM-01029: materialized view, string, is stale in ENFORCED integrity mode

Oracle Error Message

QSM-01029: materialized view, string, is stale in ENFORCED integrity mode

Reason for the Error

A stale materialized view cannot be used for query rewrite when the query rewrite integrity mode is set to ENFORCED.

Solution

Refresh the materialized view or alter the rewrite integrity mode with ALTER SESSION QUERY_REWRITE_INTEGRITY = STALE TOLERATED command.