附註:

Create Multiple Standby Databases for Oracle Exadata Database Service on Dedicated Infrastructure and Oracle Exadata Database Service on Cloud@Customer

簡介

使用者現在能夠透過 Oracle Cloud Infrastructure (OCI) Console/API/SDK 和 Terraform 為主要資料庫設定多個本機和遠端待命資料庫。

目標

作業 1:新增多個待命資料庫至現有的 Oracle Data Guard 組態

若要透過雲端自動化將多個待命資料庫新增至 Oracle Data Guard 組態,您必須切換至新的 Oracle Data Guard 群組資源,這可以隨時完成。新的 Oracle Data Guard 群組資源包含新的 API 和關聯的使用者介面。

您可以使用兩種方法從現有的 Oracle Data Guard 關聯切換到新的 Oracle Data Guard 群組資源。

注意:系統會保留使用雲端自動化建立的所有現有 Oracle Data Guard 組態和資料庫備份 / 回復功能。不過,如果您已手動設定 Oracle Data Guard 或多個待命資料庫,雲端自動化就無法辨識或支援這些資料庫。您必須使用新的 Oracle Data Guard 群組資源重新建立這些組態。

  1. 登入 OCI 主控台,瀏覽至 Oracle Database 並按一下 Oracle Exadata Database Service on Dedicated Infrastructure

    顯示 OCI 主控台導覽的映像檔

  2. 瀏覽至包含現有 Oracle Data Guard 組態之主要資料庫的雲端 VM 叢集,以新增多個待命資料庫。

  3. 資料庫詳細資訊頁面的資源底下,選取資料保全關聯,然後按一下切換至新資源以移至移轉工作流程。

    顯示切換至新資源的影像

    按一下新增待命資料庫,即可移至移轉工作流程。

    顯示新增待命資料庫的影像

  4. 按一下開始以確認移轉至新的「資料保全」群組資源。

    顯示開始新資料保全群組資源的影像

    移轉完成之後,就會顯示資料保全群組詳細資訊。目前,使用者可以新增其他待命資料庫。

    顯示已移轉資料保全群組的影像

作業 2:使用新的「資料保全群組組態」建立待命資料庫

注意:如果您要建立新的 Oracle Data Guard 組態,建議您選取新的資料保全群組資源來新增第一個待命資料庫。這可讓您日後新增其他待命資料庫。

  1. 移至主要資料庫的資料庫詳細資訊頁面,在資源底下,選取資料保全關聯,然後按一下新增待命資料庫

    顯示新增待命資料庫的影像

  2. 新增待命資料庫頁面中,選取使用新的資料保全群組資源,然後輸入下列資訊。

    這可讓您將多個待命資料庫與主要資料庫建立關聯。

    • 對等區域:選取對等區域。這是待命資料庫所在的區域。
    • 選取可用性網域: 選取可用性網域。這是目標區域內的可用性網域。
    • 選取 Exadata 基礎架構和對等 VM 叢集
    • 輸入資料保全類型資料庫本位目錄資料庫名稱以及資料庫證明資料的其他詳細資訊。

    顯示使用新 API 流程新增待命資料庫的影像

  3. 按一下新增待命資料庫

    顯示使用新 API 流程新增待命資料庫的影像

    就會建立 Oracle Data Guard 群組,並顯示詳細資訊。

    注意:將會顯示 Oracle Data Guard 群組中所有成員資料庫的資訊。這可讓使用者在單一位置檢視指定資料庫的所有待命資料庫。

    顯示資料保全群組建立狀態的映像檔

    顯示資料保全群組建立可用狀態的影像

    如果您瀏覽待命資料庫的資料庫詳細資訊頁面,將會看到 Oracle Data Guard 群組的相同資訊。

    顯示待命資料庫中資料保全群組相關資訊的影像

  4. 若要建立其他待命資料庫,請按一下主要資料庫詳細資訊頁面上的新增待命資料庫,然後輸入建立待命資料庫所需的詳細資訊。

    Note: Information for all the member databases of the Oracle Data Guard group is displayed on both the primary and all of the standby database pages.

    Image showing information for all the member databases of the data guard group

    Image showing information for all the member databases of the data guard group

Task 3: Modify the Oracle Data Guard Member Settings

  1. Go to the Database Details page of the database, under Resources, click Data Guard group.

    A list of databases that are members of the Oracle Data Guard group is displayed with the Data Guard type you have chosen for each Oracle Data Guard group member.

    To edit Oracle Data Guard group details, click the three dots, and then click Edit.

    Image showing add standby

  2. Select the updated values for Data Guard type, Protection mode, Transport type and click Edit Data Guard.

    Image showing edit data guard group

Task 4: Perform an Oracle Data Guard Switchover Operation

Users can perform a switchover between the primary database and any of the standby databases in the Oracle Data Guard group. In the new Oracle Data Guard group model, both the switchover and failover operations can be initiated from any of the standby databases.

  1. Go to the Database Details page of the database, under Resources, click Data Guard group.

    Image showing data guard group

  2. Select the standby database in the Oracle Data Guard group on which you want to perform a switchover. Click the three dots, and then click Switchover.

    Image showing switchover

  3. Enter database admin password and click Switchover to initiate a role reversal between the selected databases.

    顯示切換資料庫管理員密碼的影像

    切換時,屬於切換作業的兩個資料庫將會反映新的資料庫角色。

    切換後顯示的影像

作業 5:執行 Oracle Data Guard 容錯移轉作業

您可以在主要資料庫與 Oracle Data Guard 群組中的任何待命資料庫之間執行容錯移轉。在新的 Oracle Data Guard 群組模型中,可以從任何待命資料庫起始切換和容錯移轉作業。

  1. 選取 Oracle Data Guard 群組中要執行容錯移轉的待命資料庫。按一下三個點,然後按一下容錯移轉

    容錯移轉前顯示的影像

  2. 輸入資料庫管理員密碼,然後按一下容錯移轉,即可起始容錯移轉至新的主要資料庫。

    顯示容錯移轉資料庫管理員密碼的影像

    容錯移轉時,選取的待命資料庫將會成為 Oracle Data Guard 群組中的新主要資料庫。原始主要資料庫現在將具有停用的待命資料庫角色。

    容錯移轉後顯示的影像

作業 6:以停用的待命角色恢復待命資料庫

您可以恢復具有停用的待命資料庫角色的待命資料庫。

  1. 針對您要復原此資料庫的 Oracle Data Guard 群組,按一下三個點,然後按一下復原

    恢復前顯示的影像

  2. 輸入資料庫管理員密碼,然後按一下復原

    顯示恢復資料庫管理員密碼的影像

    將會復原停用的待命資料庫,並且擔任 Oracle Data Guard 群組中待命資料庫的角色。

    恢復後顯示的影像

認可

其他學習資源

探索 docs.oracle.com/learn 上的其他實驗室,或存取 Oracle Learning YouTube 頻道上的更多免費學習內容。此外,請造訪 education.oracle.com/learning-explorer 以成為 Oracle Learning Explorer。

如需產品文件,請造訪 Oracle Help Center