可更新物化視圖複製網站

來源:互聯網
上載者:User

可更新物化視圖說明
1.可更新的物化視圖必須屬於一個物化視圖組。
2.可更新的物化視圖總是基於單表,儘管能夠在子查詢中引用多個表。
3.可更新的物化視圖能夠快速重新整理。
4.Oracle將可更新MV的改變傳播到遠程主表或主物化視圖,遠程主表的改變同樣會傳播到所有的複製網站。
5.當建立可更新的物化視圖時,不要使用列別名(column aliases),否則使用CREATE_MVIEW_REPOBJECT過程將物化視圖添加到物化視圖組時會導致錯誤。
6.可更新的物化視圖不會自動使用主表或主物化視圖列預設值。

可更新物化視圖帶來的益處
1.即使從主要站台或主物化視圖網站斷開,使用者也能夠查詢和更新本地網站已複製的資料集(data set)。
2.相對於多主要站台的複製,要求更少的資源,卻仍然支援資料的更新操作。
3.相對於多主要站台的複製,降低了網路資源的壓力,因為物化視圖可以按需求進行重新整理(refreshed on demand),而多主要站台複製以週期性間隔(regular intervals)來傳播改變。


可更新物化視圖網站結構圖


This image shows that client applications can query and update an updatable materialized view at the materialized view site. These applications can also update data at the master. When the materialized view refreshes, the materialized view is updated with the changes at the master and the master is updated with the changes at the materialized view.

可更新物化視圖網站步驟
注意點:
Before you build materialized view environments, you must set up your master site, create a master group, and set up your intended materialized view sites. Also, if conflicts are possible at the master site due to activity at the materialized view sites you are creating, then configure conflict resolution for the master tables of the materialized views before you create the materialized view group.
1.Setting Up Master Sites

2.Setting Up Materialized View Sites

3.Create a Master Group

4.Create Materialized View Group

具體的操作步驟可以參考:
Advanced Replication Management API Reference

主組(master group)複製過程與靜默過程
SUSPEND_MASTER_ACTIVITY Procedure
This procedure suspends replication activity for a master group. You use this procedure toquiesce the master group. You must call this procedure from the master definition site.
DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY (
   gname   IN   VARCHAR2);

RESUME_MASTER_ACTIVITY Procedure
This procedure resumes normal replication activity after quiescing a replication environment.
DBMS_REPCAT.RESUME_MASTER_ACTIVITY (
   gname       IN  VARCHAR2,
   override    IN  BOOLEAN := false);

參考:
Overview of Updatable Materialized Views
http://docs.oracle.com/cd/B19306_01/server.102/b14226/repoverview.htm#sthref53     
Updatable Materialized Views

http://docs.oracle.com/cd/B19306_01/server.102/b14226/repmview.htm#sthref396       

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.