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 not getting auto refresh

user1680623Aug 20 2014 — edited Aug 22 2014

Hi,

i have created one materialized view (EMP,DEPT table) with FAST REFRESH option on Commit event. But when any insert or update statement got executed on base table the materialized view not getting auto refresh/update. Can you please find the root cause on this...code are below for your reference.

CREATE MATERIALIZED VIEW LOG ON employees_test

WITH SEQUENCE, ROWID (JOB_ID, DEPARTMENT_ID, SALARY)

INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW LOG ON department_test

WITH SEQUENCE, ROWID (depsrlno)

INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW sal_dept_mv

           NOLOGGING

           PARALLEL

           BUILD IMMEDIATE

           REFRESH FAST ON COMMIT

           ENABLE QUERY REWRITE

           AS

          SELECT e.job_id, e.department_id, sum(e.salary)

          FROM employees_test e,

               department_test d

          WHERE e.department_id=d.depsrlno

          GROUP BY e.job_id, e.department_id;

Thanks,

Ajay

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2014
Added on Aug 20 2014
11 comments
2,867 views