Note
For V4.4.2, the KILL_REFRESH statement is available starting from V4.4.2 BP2.
The KILL_REFRESH statement is used to actively terminate a materialized view refresh batch that is currently in progress and managed by the new scheduling framework.
Overview
After you call DBMS_MVIEW.KILL_REFRESH(refresh_id), the system performs the following operations on the refresh batch corresponding to the specified refresh_id:
- Mark tasks in the
PENDINGstate asCANCELLED: All unscheduled tasks will be immediately canceled and will no longer enter the scheduling queue. - Terminate tasks in the
RUNNINGstate: For running tasks, the system locates their executing session and initiates akilloperation to forcibly interrupt their execution flow. - Status convergence processing: Tasks that are killed are eventually marked with the status
CANCELLED. - Final states of tasks are not affected: Tasks that have already completed (
SUCCESS), failed (FAILED), or been canceled (CANCELLED) will not be affected by this termination operation.
Syntax
DBMS_MVIEW.KILL_REFRESH(refresh_id)
Parameters
Parameter |
Note |
|---|---|
| refresh_id | Specifies the unique identifier for the materialized view refresh batch, which is assigned by the new scheduling framework.
NoteYou can view the |
Examples
Terminates the refresh of the materialized view with refresh_id 100023.
obclient> CALL DBMS_MVIEW.KILL_REFRESH(100023);
References
For more information about refreshing materialized views, see Refresh a materialized view.
