Cause
Running the following query shows a trigflag of 2 which means that a materialized view log should
exist on the object.
select trigflag, OBJ# from tab$ where obj# = (select object_id from dba_objects
where owner = 'SCOTT' and object_name = 'TEST_MV' and object_type = 'TABLE');
In this case the materialized view log, mlog$_test_mv did not exist.
Solution
To implement the solution, please execute the following steps:
1. If the materialized view log exists, attempt to drop the log and then drop the mview.
connect scott/tiger
drop materialized view log on test_mv;
drop materialized view test_mv;
2. If step 1 fails with an ORA-12002: there is no materialized view log on table,
attempt to create a materialized view log on the materialized view and then drop the mview.
connect scott/tiger
create materialized view log on test_mv;
drop materialized view log on test_mv;
drop materialized view test_mv;
Partager