Oracle 11g 新特性:Active Data Guard

來源:互聯網
上載者:User

   在Oracle 11g之前,物理備庫(physical Standby)在應用redo的時候,是不可以開啟的,只可以mount。從11g開始,在應用redo的時候,物理備庫可以處於read-only模式,這就稱為Active Data Guard 。通過Active Data Guard,可以在物理備庫進行查詢或者匯出資料,從而減少對主庫的訪問和壓力。

   Active Data Guard適用於一些唯讀性的應用,比如,有的應用程式只是查詢資料,進行一些報表業務,不會產生redo資料,這些應用可以轉移到備庫上,避免對主庫資源的爭用。

   Oracle Active Data Guard 是Oracle Database Enterprise Edition的一個功能,需要額外付費來使用這個功能。

   如需啟用Active Data Guard, 只需要將備庫以 read-only 模式開啟,而且執行 ALTER DATABASE RECOVER MANAGED STANDBY DATABASE語句就可以。需要注意的是:主庫和備庫的COMPATIBLE 參數至少要設定為11.0.0。

  如果已經啟用了Active Data Guard,備庫的V$DATABASE會顯示為"READ ONLY WITH APPLY':

      SQL> SELECT open_mode FROM V$DATABASE;
      OPEN_MODE
      --------------------
      READ ONLY WITH APPLY


  注意:使用Active
Data Guard
要求主庫和備庫的COMPATIBLE 參數至少設定為11.0.0。

  為了保證備庫資料的即時性,需要在備庫啟動real-time apply:
   SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;

  下面的功能是允許在read-only的資料庫上執行的:
    • Issue SELECT statements, including queries that require multiple sorts that leverage TEMP
segments
    • Use ALTER SESSION and ALTER SYSTEM statements
    • Use SET ROLE
    • Call stored procedures
    • Use database links (dblinks) to write to remote databases
    • Use stored procedures to call remote procedures via dblinks
    • Use SET TRANSACTION READ ONLY for transaction level read consistency
    • Issue complex queries (such as grouping SET queries and WITH CLAUSE queries)

  下面的功能是不允許在read-only的資料庫上執行的:
    • Any DMLs (excluding simple SELECT statements) or DDLs
    • Query accessing local sequences
    • DMLs to local temporary tables

    比較典型的Active Data Guard 分為:
  • 單一實例的物理主庫和單一實例的物理備庫
  • 主庫為Oracle Real Application Clusters (Oracle RAC) ,備庫為單一實例
  • RAC主庫和RAC備庫

    Oracle Data Guard 的配置方法,,請參考下面的文檔:


   * 單一實例的物理主庫和單一實例的物理備庫:
     http://docs.oracle.com/cd/B28359_01/server.111/b28294/create_ps.htm

  * 主庫為Oracle Real Application Clusters (Oracle RAC) ,備庫為單一實例:
     http://www.oracle.com/technetwork/database/features/availability/maa-wp-10g-racprimarysingleinstance-131970.pdf

   * RAC 主庫和RAC 備庫:
     http://www.oracle.com/technetwork/database/features/availability/maa-wp-10g-racprimaryracphysicalsta-131940.pdf

   關於Active Data Guard的最佳實務經驗,請參考文檔:
    http://www.oracle.com/technetwork/database/features/availability/maa-wp-11gr1-activedataguard-1-128199.pdf


    關於Oracle Maximum Availability Architecture Best Practices的更多文檔,請參考:
   http://www.oracle.com/goto/maa

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.