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!

How to refresh a materialized view thru DBLINK..?

sgudipudiApr 7 2011 — edited Apr 7 2011
Hi,

oracle version 11.1.0.7

I have 3 materialized views lets say..... RMT_MV1(on Remote DB),MV2(local) and MV3(local)


I want to execute a procedure to refresh a materialized view in remote data base(eg: RMT_MV1)

MV3 dependent on MV2 and MV2 is dependent on RMT_MV1.
I want to refresh these materialized views in the following order.. first RMT_MV1 second MV2 and finally MV3.


i want to write a procedure to do as above
create or replace REFRESH_PROC
AS
BEGIN

DBMS_MVIEW.REFRESH@DBLINK('RMT_MV1','F');
DBMS_MVIEW.REFRESH('MV2','F');
DBMS_MVIEW.REFRESH('MV3','c');

END;
can i able to do like this? Any inputs would be helpful...


Thanks,
Mike
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2011
Added on Apr 7 2011
1 comment
177 views