Oracle Materialized View Refresh Dependency

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Oracle Materialized View Refresh Dependency

Postby Guru3i » Fri Dec 14, 2012 5:06 pm

Hi Tim,

There are 2 Materialized views to be refreshed. "Mview B" is dependent on "Mview A", In other Words Mview B queries/retreives data from Mview A.

"Mview A" is scheduled to refresh @ 5.00 PM in the evening and "Mview B" @ 6 in the evening. At times "Mview A" doesnt gets refreshed before 6 PM. But however "Mview B" starts to refresh by 6 PM, if that happens the data retreived by Mview B will not be correct and consistent. Here how do we ensure that "Mview B" starts to refresh only after "Mview A" refresh is Over. How do we enforce a dependency on Mview B or check on Mview B that it should refresh only after Mview A is fully refreshed.

Thanks in advance.
Guru3i
Senior Member
 
Posts: 95
Joined: Fri Aug 24, 2007 7:17 am

Re: Oracle Materialized View Refresh Dependency

Postby Tim... » Fri Dec 14, 2012 6:02 pm

Hi.

1) Stop refreshing them automatically and independently. Instead create job and do a manual refresh of both in the correct order. That way the second will only ever start after the first is complete.

2) Stop refreshing them automatically and independently. Create two separate jobs in a job chain.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17937
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle SQL and PL/SQL Development

Who is online

Users browsing this forum: No registered users and 5 guests

cron