Search This Blog

Wednesday, August 31, 2011

Flashback table is not working with Materialized views

create table t ( id number);
alter table t enable row movement;

insert into t values (1);
insert into t values (1);
insert into t values (1);
commit;
select sys.dbms_flashback.get_system_change_number,min(id), max(id), count(*) from t;
GET_SYSTEM_CHANGE_NUMBER MIN(ID) MAX(ID) COUNT(*)
------------------------ ---------- ---------- ----------
799014346 1 1 3
update t set id=2;
commit;
select sys.dbms_flashback.get_system_change_number,min(id), max(id), count(*) from t;
GET_SYSTEM_CHANGE_NUMBER MIN(ID) MAX(ID) COUNT(*)
------------------------ ---------- ---------- ----------
799014354 2 2 3

create materialized view t_mv
as
select id from t;

ORA-08194: Flashback Table operation is not allowed on materialized views
flashback table t to scn 799014346;


drop materialized view t_mv

flashback table t to scn 799014346;


How to flashback MVs and MV referred tables [ID 781112.1]