Refresh Materialized view

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Refresh Materialized view

Arsalan

Sir

I have more then 50 materialized in my Data warehouse which are dblink with production database.

Example

create materialized view MV_VIEWE_NAME  refresh on demand with rowid as select * from

SIGTASAD.TABLE_NAME@dwhsig_link;


so does it possible to refresh all M view in one command. i have found one example kindly verify it.

DECLARE
v_number_of_failures NUMBER(12) := 0;
BEGIN
DBMS_MVIEW.REFRESH_ALL_MVIEWS(v_number_of_failures,'F','', TRUE, FALSE);
END;
Reply | Threaded
Open this post in threaded view
|

Re: Refresh Materialized view

ErmanArslansOracleBlog
Administrator
create a materialized view  "Refresh group".
Put your materialized views in that materialized view Refresh group.
Refresh the Refresh group..

21 Ara 2016 09:24 tarihinde "Arsala saleem [via Erman Arslan's Oracle Forum]" <[hidden email]> yazdı:

Sir

I have more then 50 materialized in my Data warehouse which are dblink with production database.

Example

create materialized view MV_VIEWE_NAME  refresh on demand with rowid as select * from

SIGTASAD.TABLE_NAME@dwhsig_link;


so does it possible to refresh all M view in one command. i have found one example kindly verify it.

DECLARE
v_number_of_failures NUMBER(12) := 0;
BEGIN
DBMS_MVIEW.REFRESH_ALL_MVIEWS(v_number_of_failures,'F','', TRUE, FALSE);
END;



If you reply to this email, your message will be added to the discussion below:
http://erman-arslan-s-oracle-forum.2340467.n4.nabble.com/Refresh-Materialized-view-tp1792.html
To start a new topic under Database, email [hidden email]
To unsubscribe from Erman Arslan's Oracle Forum, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Refresh Materialized view

Arsalan
This post was updated on .
Brother

1- I mean this script is good to referesh all Materialzied view or not ?

or  i should create refresh group which one is more useful ?


DECLARE
v_number_of_failures NUMBER(12) := 0;
BEGIN
DBMS_MVIEW.REFRESH_ALL_MVIEWS(v_number_of_failures,'F','', TRUE, FALSE);
END;

Note : I have more then 50 Materialized view .
Reply | Threaded
Open this post in threaded view
|

Re: Refresh Materialized view

ErmanArslansOracleBlog
Administrator
It will refresh...

But you also need to consider the following:

REFRESH_ALL_MVIEWS Procedure refreshes all materialized views that have the following properties:

*The materialized view has not been refreshed since the most recent change to a master table or master materialized view on which it depends.
*The materialized view and all of the master tables or master materialized views on which it depends are local.
*The materialized view is in the view DBA_MVIEWS.

Read: https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_mview.htm#CEGHCECB for more..