refresh materialized views
s_mFeb 21 2012 — edited Feb 21 2012Hi all,
I have created a procedure to refresh materialized views:
create or replace procedure refresh_MV1 is
begin
dbms_mview.refresh('Materialized_view_1','C')
exception
when others then
insert into tablelog_mv(sysdate, 'Materialized_view_1',substr(sqlerrm,1,200));
end;
when I run execute this procedurev(exec refresh_MV1), I am getting following error:
due to :ORA-12018: following error encountered during code generation for "ISGCOS"."Materialized_view_1" ORA-00942: table or view does not exist ORA-00942: table or view does not exist
But if I run it anonymously without creating procedure like below, it runs fine and the mat view gets refreshed:
begin
dbms_mview.refresh('Materialized_view_1','C')
exception
when others then
insert into tablelog_mv(sysdate, 'Materialized_view_1',substr(sqlerrm,1,200));
end;
I couldn't figure out what might be the problem??
Thanks,
Samip