Hi all,
I have a problem refreshing 2 materialized views.
I use the below procedure
CREATE OR REPLACE PROCEDURE refresh_mv_error_messages AS
PRAGMA autonomous_transaction;
BEGIN
DBMS_MVIEW.REFRESH('MV_ERROR_MESSAGES', method => 'C', atomic_refresh => FALSE, out_of_place => TRUE);
DBMS_MVIEW.REFRESH('MV_ERROR_MESSAGE_IECA_FREE_LOOKUP', method => 'C', atomic_refresh => FALSE, out_of_place => TRUE);
END;
/
and I have a scheduler to run every ~6-7 hours
BEGIN
dbms_scheduler.create_job (
job_name => 'REFRESH_MV_ERROR_MESSAGES_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN REFRESH_MV_ERROR_MESSAGES; END;',
start_date => SYSTIMESTAMP,
enabled => true,
repeat_interval => 'FREQ=DAILY;BYHOUR=5,11,17,22;BYMINUTE=0'
);
END;
/
The refresh of the first materialized view takes 3 hours and 10 minutes trying it manually whereas the second materialized views which is based on the first one only some minutes.
When I am trying it with the scheduler I get error
ORA-12008: error in materialized view or zonemap refresh path
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3020
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2432
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 88
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 253
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2413
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2976
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3263
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3295
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 16
ORA-06512: at "OWNER_CSMIS2.REFRESH_MV_ERROR_MESSAGES", line 5
ORA-06512: at line 1
could you please help me ?