'Can a materialized view be rolled back

Once an Oracle materialized view refreshes successfully can it be rolled back or put back to what it was prior to the refresh? Can the materialized view log on the master table be used if there is one?

I have an etl processes which has several procedures and materialized view refreshes. The way it is supposed to work if something fails than every thing that was done prior to it is rolled back. If something fails after a materialized view has been refreshed can the refresh be rolled back?



Solution 1:[1]

You can not manually rollback a materialized view refresh, once the refresh procedure is complete it has committed.

What you can do is lump all your materialized view refreshes into the same dbms_mview.refresh call. The default arguments for refresh_after_errors, atomic_refresh mean that if one of the MView refreshes in your list fail, the whole thing will be rolled back.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andrew Sayer