How to Cancel a Refresh Operation of a Materialized View (MV) When it is Scheduled via Job (Doc ID 806833.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.


Goal

Refreshing a materialized view (MV) is controlled by either


This article deals with the scenario where an MV is refreshed via a scheduled job, similar to the following definition:

CREATE MATERIALIZED VIEW TESTMV
  NOLOGGING
  BUILD DEFERRED
  REFRESH COMPLETE ON DEMAND
  NEXT trunc(sysdate + 1,'dd') + (1/24)
AS
  SELECT * FROM EMP;


Note that the NEXT phrase specifies that the MV should be refreshed automatically every day at 01:00 at night (1 AM).

If this job fails to complete, the job subsystem will reschedule the job to run again.

This may lead to a situation where the system becomes busy always attempting to complete a refresh, specifically if the MV is more complex than the one shown in this (simple) example.

The solution below explains how to stop a job from running and from being rescheduled over and over so that corrective action can be taken.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms