How to Cancel a Refresh Operation of a Materialized View (MV) When it is Scheduled via Job
Last updated on JANUARY 18, 2017
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.1 to 18.104.22.168 [Release 10.2 to 11.2]
Information in this document applies to any platform.
Refreshing a materialized view (MV) is controlled by either
- a user of the RDBMS initiating a refresh
- a commit
- a job scheduled to run at pre-determined times
This article deals with the scenario where an MV is refreshed via a scheduled job, similar to the following definition:
REFRESH COMPLETE ON DEMAND
NEXT trunc(sysdate + 1,'dd') + (1/24)
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.
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