Your browser does not support JavaScript. This help page requires JavaScript to render correctly.
Previous
Previous
 
Next
Next

Managing Materialized View Log Space

Oracle automatically tracks which rows in a materialized view log have been used during the refreshes of materialized views, and purges these rows from the log so that the log does not grow endlessly. Because multiple simple materialized views can use the same materialized view log, rows already used to refresh one materialized view may still be needed to refresh another materialized view. Oracle does not delete rows from the log until all materialized views have used them.

For example, suppose two materialized views were created against the CUSTOMERS table in a master site. Oracle refreshes the CUSTOMERS materialized view at the SPDB1 database. However, the server that manages the master table and associated materialized view log does not purge the materialized view log rows used during the refresh of this materialized view until the CUSTOMERS materialized view at the SPDB2 database also refreshes using these rows.

Because Oracle must wait for all dependent materialized views to refresh before purging rows from a materialized view log, unwanted situations can occur that cause a materialized view log to grow indefinitely when multiple materialized views are based on the same master table. For example, such situations can occur when more than one materialized view is based on a master table and one of the following conditions is true:

Because of situations such as these, you may need to manually purge rows from your materialized view log using the DBMS_SNAPSHOT.PURGE_LOG procedure, or you may need to TRUNCATE your materialized view log.

If you purge or TRUNCATE the materialized view log before a materialized view has refreshed the changes that were deleted, the materialized view must perform a complete refresh.

Note: Oracle Database Advanced Replication Management API Reference contains detailed information about managing space in your materialized view logs.

Related Topics

Flowchart for Using Deployment Templates

Creating a Deployment Template

Creating a Materialized View Group

Materialized View Logs

Creating Materialized View Logs