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!

refresh materialized views

s_mFeb 21 2012 — edited Feb 21 2012
Hi 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
This post has been answered by unknown-7404 on Feb 21 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2012
Added on Feb 21 2012
3 comments
151 views