AYR
AYR

Reputation: 1179

Automatic Refresh of many materialized views

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?

Upvotes: 2

Views: 5525

Answers (2)

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.

Upvotes: 1

Jafar Kofahi
Jafar Kofahi

Reputation: 763

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

Upvotes: 3

Related Questions