I have an entire schema of materialized views (about 300 tables) for which I need to perform an automatic refresh on every night. I know how to create 1 materialized view that will automatically refresh, my question is: how do I create many that need to start at the same time? Will the oracle database automatically refresh them one after another or do I need to set their start-times to be different?

2 Answers

Oracle come with some useful utilities. In your case you can schedule a job to run DBMS_MVIEW.REFRESH_ALL_MVIEWS (you can read more about it here). This way you dont need to worry about handling each one of them separately

You can run this to refresh all your views:

DBMS_MVIEW.REFRESH_ALL_MVIEWS(failures,'C','', TRUE, FALSE, FALSE); 

You can find more information here on Refresh All Materialized Views with REFRESH_ALL_MVIEWS

PS: I had miss read the post above, although the answer has already been provided, I think this might help and had more valuable information.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.