I have an oracle database (DB1) which, via a db-link to DB2, refreshes materialized views every midnight using a scheduled JOB.
The refresh of the MVs occurs ussing a procedure which runs over every table name in a schema and refreshed each table, one by one.
Recently, there have been electricity issues where DB2 is stationed. If DB2 is offline whilst DB1 starts its job the materialized views on DB1 become empty. Why does the refresh not simply fail if there is no connection? How can I stop this from happening?
Thanks in advance