Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Materialized view is not getting auto refresh after deletion data from master table

Harikanth KonetiOct 27 2017 — edited Oct 30 2017

Hi Folks,

i have create the materialized view logs like below

create materialized view log on EMPĀ  with rowid, sequence(SAL,DEPTNO) including new values;

create materialized view log on dept1 with rowid,sequence(DEPTNO,dname) including new values;

and then created the materialized view like below to get auto refresh for every 1 Min

create materialized view HARI_MV

refresh fast

start with sysdate next sysdate+1/1440

enable query rewrite

as

select SUM(e.SAL),e.DEPTNO,d.dname from EMP e ,dept1 d where e.deptno=d.deptno group by e.DEPTNO,d.dname;

i have inserted row into emp table like below

insert into EMP(EMPNO,SAL,DEPTNO) values(12,50000,10);

commit;

then checked whether materialized view is being auto refresh or not. yes it's being auto refreshed for every 1 Min

select a.LAST_REFRESH_DATE,a.* from user_mviews a where a.MVIEW_NAME='HARI_MV';

But when i deleted inserted row and issued commit statement, materialized view is not getting refresh.

Please let me know what went wrong. i did search in google to found out issue but i was unable to find exactly what was solution for this issue.

Many Thanks in advance,

Harikanth.

This post has been answered by AndrewSayer on Oct 30 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2017
Added on Oct 27 2017
18 comments
1,142 views