附註:
- 此教學課程需要存取 Oracle Cloud。若要註冊免費帳戶,請參閱 Oracle Cloud Infrastructure Free Tier 入門。
- 它使用 Oracle Cloud Infrastructure 證明資料、租用戶及區間的範例值。完成實驗室時,請將這些值取代為您雲端環境特定的值。
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 為主要資料庫設定多個本機和遠端待命資料庫。
目標
-
新增一個以上的待命資料庫至現有的 Oracle Data Guard 組態。
-
使用新的 Oracle Data Guard 群組組態建立待命資料庫。
-
修改 Oracle Data Guard 成員設定值。
-
執行 Oracle Data Guard 切換作業。
-
執行 Oracle Data Guard 容錯移轉作業。
-
以停用的待命資料庫角色復原待命資料庫。
作業 1:新增多個待命資料庫至現有的 Oracle Data Guard 組態
若要透過雲端自動化將多個待命資料庫新增至 Oracle Data Guard 組態,您必須切換至新的 Oracle Data Guard 群組資源,這可以隨時完成。新的 Oracle Data Guard 群組資源包含新的 API 和關聯的使用者介面。
您可以使用兩種方法從現有的 Oracle Data Guard 關聯切換到新的 Oracle Data Guard 群組資源。
-
方法 1:在資料庫詳細資訊頁面頂端顯示的標幟中,按一下切換至新資源。
-
方法 2:按一下主要資料庫頁面上的新增待命資料庫。
注意:系統會保留使用雲端自動化建立的所有現有 Oracle Data Guard 組態和資料庫備份 / 回復功能。不過,如果您已手動設定 Oracle Data Guard 或多個待命資料庫,雲端自動化就無法辨識或支援這些資料庫。您必須使用新的 Oracle Data Guard 群組資源重新建立這些組態。
-
登入 OCI 主控台,瀏覽至 Oracle Database 並按一下 Oracle Exadata Database Service on Dedicated Infrastructure 。
-
瀏覽至包含現有 Oracle Data Guard 組態之主要資料庫的雲端 VM 叢集,以新增多個待命資料庫。
-
在資料庫詳細資訊頁面的資源底下,選取資料保全關聯,然後按一下切換至新資源以移至移轉工作流程。
或
按一下新增待命資料庫,即可移至移轉工作流程。
-
按一下開始以確認移轉至新的「資料保全」群組資源。
移轉完成之後,就會顯示資料保全群組詳細資訊。目前,使用者可以新增其他待命資料庫。
作業 2:使用新的「資料保全群組組態」建立待命資料庫
注意:如果您要建立新的 Oracle Data Guard 組態,建議您選取新的資料保全群組資源來新增第一個待命資料庫。這可讓您日後新增其他待命資料庫。
-
移至主要資料庫的資料庫詳細資訊頁面,在資源底下,選取資料保全關聯,然後按一下新增待命資料庫。
-
在新增待命資料庫頁面中,選取使用新的資料保全群組資源,然後輸入下列資訊。
這可讓您將多個待命資料庫與主要資料庫建立關聯。
- 對等區域:選取對等區域。這是待命資料庫所在的區域。
- 選取可用性網域: 選取可用性網域。這是目標區域內的可用性網域。
- 選取 Exadata 基礎架構和對等 VM 叢集。
- 輸入資料保全類型、資料庫本位目錄、資料庫名稱以及資料庫證明資料的其他詳細資訊。
-
按一下新增待命資料庫。
就會建立 Oracle Data Guard 群組,並顯示詳細資訊。
注意:將會顯示 Oracle Data Guard 群組中所有成員資料庫的資訊。這可讓使用者在單一位置檢視指定資料庫的所有待命資料庫。
如果您瀏覽待命資料庫的資料庫詳細資訊頁面,將會看到 Oracle Data Guard 群組的相同資訊。
-
若要建立其他待命資料庫,請按一下主要資料庫詳細資訊頁面上的新增待命資料庫,然後輸入建立待命資料庫所需的詳細資訊。
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.
Task 3: Modify the Oracle Data Guard Member Settings
-
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.
-
Select the updated values for Data Guard type, Protection mode, Transport type and click Edit Data Guard.
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.
-
Go to the Database Details page of the database, under Resources, click Data Guard group.
-
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.
-
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 群組模型中,可以從任何待命資料庫起始切換和容錯移轉作業。
-
選取 Oracle Data Guard 群組中要執行容錯移轉的待命資料庫。按一下三個點,然後按一下容錯移轉。
-
輸入資料庫管理員密碼,然後按一下容錯移轉,即可起始容錯移轉至新的主要資料庫。
容錯移轉時,選取的待命資料庫將會成為 Oracle Data Guard 群組中的新主要資料庫。原始主要資料庫現在將具有停用的待命資料庫角色。
作業 6:以停用的待命角色恢復待命資料庫
您可以恢復具有停用的待命資料庫角色的待命資料庫。
-
針對您要復原此資料庫的 Oracle Data Guard 群組,按一下三個點,然後按一下復原。
-
輸入資料庫管理員密碼,然後按一下復原。
將會復原停用的待命資料庫,並且擔任 Oracle Data Guard 群組中待命資料庫的角色。
相關連結
認可
- 作者 - Dileep Thiagarajan、Tammy Bednar、Leo Alvarado (產品管理)
其他學習資源
探索 docs.oracle.com/learn 上的其他實驗室,或存取 Oracle Learning YouTube 頻道上的更多免費學習內容。此外,請造訪 education.oracle.com/learning-explorer 以成為 Oracle Learning Explorer。
如需產品文件,請造訪 Oracle Help Center 。
Create Multiple Standby Databases for Oracle Exadata Database Service on Dedicated Infrastructure and Oracle Exadata Database Service on Cloud@Customer
G25313-01
January 2025