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!

create an mview to run refresh every 5 minutes during business hours and business days

oraLaroSep 17 2020 — edited Sep 18 2020

Oracle 12.2

I can create an mview to refresh every 5 minutes

create materialized view mv1

refresh complete start with (sysdate) next  (sysdate+5/1440)

as

..

..

but I only want it to run Mon-Fri and between 9am-5pm.

This should be doable in a scheduler job with BYHOUR and BYMINUTE and BYDAY in my repeat_interval.   Is there anyway to do this within the mview refresh schedule itself or in an mview refresh group or do I have to use a scheduler job?  I cant find examples online of how to do it in the mview clause.  Its no problem to do with a scheduler job, I was just wondering if it was possible in the mview directly.

This post has been answered by Solomon Yakobson on Sep 17 2020
Jump to Answer
Comments
Post Details
Added on Sep 17 2020
6 comments
5,128 views