

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用作用中待命資料庫為 Amazon RDS Custom 上的 Oracle 電子商務套件設定 HA/DR 架構
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database"></a>

*Simon Cunningham、Jaydeep Nandy 和 Nitin Saxena，Amazon Web Services*

## 總結
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-summary"></a>

此模式說明如何在 Amazon Relational Database Service (Amazon RDS) Custom 上架構 Oracle E-Business 解決方案，以便在另一個 Amazon Web Services (AWS) 可用區域中設定 Amazon RDS Custom 僅供讀取複本資料庫，並將其轉換為作用中待命資料庫，以獲得高可用性 (HA) 和災難復原 (DR)。Amazon RDS Custom 僅供讀取複本的建立是透過 AWS 管理主控台完全自動化。

此模式不會討論新增其他應用程式層和共用檔案系統的步驟，這也可能是 HA/DR 架構的一部分。如需這些主題的詳細資訊，請參閱下列 Oracle 支援備註：1375769.1、1375670.1 和 1383621.1 （第 5 節，*進階複製選項*)。（存取需要 [Oracle Support](https://support.oracle.com/portal/) 帳戶。)

若要將 E-Business Suite 系統遷移至 Amazon Web Services (AWS) 上的單一層級單一可用區架構，請參閱將 [Oracle E-Business Suite 遷移至 Amazon RDS Custom](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-oracle-e-business-suite-to-amazon-rds-custom.html) 模式。

Oracle E-Business Suite 是一種企業資源規劃 (ERP) 解決方案，可自動化整個企業的流程，例如財務、人力資源、供應鏈和製造。它具有三層架構：用戶端、應用程式和資料庫。先前，您必須在自我管理的 [Amazon Elastic Compute Cloud (Amazon EC2) 執行個體上執行 E-Business Suite 資料庫，](https://aws.amazon.com/ec2/)但您現在可以受益於 [Amazon RDS Custom](https://aws.amazon.com/rds/custom/)。 

## 先決條件和限制
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-prereqs"></a>

**先決條件**
+ Amazon RDS Custom 上現有的 E-Business Suite 安裝；請參閱將 [Oracle E-Business Suite 遷移至 Amazon RDS Custom](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-oracle-e-business-suite-to-amazon-rds-custom.html) 的模式
+ 如果您想要將僅供讀取複本變更為唯讀，並使用它將報告卸載至待命，則為 [Oracle Active Data Guard 資料庫授權](https://www.oracle.com/corporate/pricing/) （請參閱 *Oracle Technology 商業價目表*)

**限制**
+ [Amazon RDS Custom 上 Oracle 資料庫](https://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/custom-reqs-limits.html#custom-reqs-limits.limits)的限制和不支援的組態
+ 與 [Amazon RDS Custom for Oracle 僅供讀取複本](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-rr.html#custom-rr.limitations)相關聯的限制

**產品版本**

對於 Amazon RDS Custom 支援的 Oracle 資料庫版本和執行個體類別，請參閱 [Amazon RDS Custom for Oracle 的要求和限制](https://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/custom-reqs-limits.html)。

## Architecture
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-architecture"></a>

下圖說明 AWS 上 E-Business Suite 的代表性架構，其中包含作用中/被動設定中的多個可用區域和應用程式層。資料庫使用 Amazon RDS Custom 資料庫執行個體和 Amazon RDS Custom 僅供讀取複本。僅供讀取複本使用 Active Data Guard 複寫到另一個可用區域。您也可以使用僅供讀取複本卸載主要資料庫上的讀取流量，並用於報告目的。

![\[AWS 上適用於 Oracle E-Business Suite 的異地同步備份架構\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/a17947e8-56b1-4d92-91df-096c02ff4c19/images/ffdaa2d4-123b-44a0-8d52-b1352a4eee44.png)


如需詳細資訊，請參閱《[Amazon RDS 文件》中的使用 Amazon RDS Custom for Oracle 的僅供讀取複本](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-rr.html)。 

根據預設，Amazon RDS Custom 僅供讀取複本會建立為掛載。不過，如果您想要將部分唯讀工作負載卸載至待命資料庫，以減少主要資料庫的負載，您可以依照 [Epics](#set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-epics) 區段中的步驟，手動將掛載複本的模式變更為唯讀。典型的使用案例是從待命資料庫執行您的報告。變更為唯讀需要作用中的待命資料庫授權。 

當您在 AWS 上建立僅供讀取複本時，系統會在封面下使用 Oracle Data Guard 代理程式。 此組態會自動產生並在最高效能模式中設定，如下所示：

```
DGMGRL> show configuration
Configuration - rds_dg
  Protection Mode: MaxPerformance
  Members:
  vis_a - Primary database
    vis_b - Physical standby database 
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS   (status updated 58 seconds ago)
```

## 工具
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-tools"></a>

**AWS 服務**
+ [Amazon RDS Custom for Oracle](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/working-with-custom-oracle.html) 是一種受管資料庫服務，適用於需要存取基礎作業系統和資料庫環境的舊版、自訂和封裝應用程式。它可自動化資料庫管理任務和操作，同時讓身為資料庫管理員的您能夠存取和自訂資料庫環境和作業系統。 

**其他工具**
+ Oracle Data Guard 是一種工具，可協助您建立和管理 Oracle 待命資料庫。此模式使用 Oracle Data Guard 在 Amazon RDS Custom 上設定作用中待命資料庫。

## 史詩
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-epics"></a>

### 建立僅供讀取複本
<a name="create-a-read-replica"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立 Amazon RDS Custom 資料庫執行個體的僅供讀取複本。 | 若要建立僅供讀取複本，請遵循 [Amazon RDS 文件](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html#USER_ReadRepl.Create)中的指示，並使用您建立的 Amazon RDS Custom 資料庫執行個體 （請參閱[先決條件](#set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-prereqs)一節） 做為來源資料庫。根據預設，Amazon RDS Custom 僅供讀取複本會建立為實體待命，且處於掛載狀態。這是為了確保符合 Oracle Active Data Guard 授權。請依照下列步驟，將僅供讀取複本轉換為唯讀模式。 | DBA | 

### 將僅供讀取複本變更為唯讀作用中待命
<a name="change-the-read-replica-to-a-read-only-active-standby"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 連線至 Amazon RDS Custom 僅供讀取複本。 | 使用以下命令將實體待命資料庫轉換為作用中待命資料庫。 這些命令需要 Oracle 作用中待命授權。若要取得授權，請聯絡您的 Oracle 代表。<pre>$ sudo su - rdsdb<br />-bash-4.2$ sql<br />SQL> select process,status,sequence# from v$managed_standby;<br /><br />PROCESS    STATUS        SEQUENCE#<br />--------- ------------ ----------<br />ARCH       CLOSING            3956<br />ARCH       CONNECTED             0<br />ARCH       CLOSING            3955<br />ARCH       CLOSING            3957<br />RFS        IDLE                  0<br />RFS        IDLE               3958<br />MRP0       APPLYING_LOG       3958<br />SQL> select name, database_role, open_mode from v$database;<br /><br />NAME       DATABASE_ROLE    OPEN_MODE<br />--------- ---------------- --------------------<br />VIS        PHYSICAL STANDBY MOUNTED<br />SQL> alter database recover managed standby database cancel;<br />Database altered.<br />Open the standby database<br />SQL> alter database open;<br />Database altered.<br />SQL> select name, database_role, open_mode from v$database;<br /><br />NAME       DATABASE_ROLE    OPEN_MODE<br />--------- ---------------- --------------------<br />VIS        PHYSICAL STANDBY READ ONLY</pre> | DBA | 
| 使用即時日誌啟動媒體復原。 | 若要啟用即時日誌套用功能，請使用下列命令。這些轉換和驗證待命 （僅供讀取複本） 為作用中待命資料庫，因此您可以連接和執行唯讀查詢。<pre>SQL>   alter database recover managed standby database using current logfile disconnect from session;<br />Database altered</pre> | DBA | 
| 檢查資料庫狀態。 | 若要檢查資料庫的狀態，請使用下列命令。<pre>SQL> select name, database_role, open_mode from v$database;<br />NAME      DATABASE_ROLE    OPEN_MODE<br />--------- ---------------- --------------------<br />VIS       PHYSICAL STANDBY READ ONLY WITH APPLY</pre> | DBA | 
| 檢查重做套用模式。 | 若要檢查重做套用模式，請使用下列命令。<pre>SQL> select process,status,sequence# from v$managed_standby;<br />PROCESS    STATUS        SEQUENCE#<br />--------- ------------ ----------<br />ARCH       CLOSING            3956<br />ARCH       CONNECTED             0<br />ARCH       CLOSING            3955<br />ARCH       CLOSING            3957<br />RFS        IDLE                  0<br />RFS        IDLE               3958<br />MRP0       APPLYING_LOG       3958<br /> <br />SQL> select open_mode from v$database;<br />OPEN_MODE<br />--------------------<br />READ ONLY WITH APPLY</pre> | DBA | 

## 相關資源
<a name="set-up-an-ha-dr-architecture-for-oracle-e-business-suite-on-amazon-rds-custom-with-an-active-standby-database-resources"></a>
+ [將 Oracle 電子商務套件遷移至 Amazon RDS Custom](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-oracle-e-business-suite-to-amazon-rds-custom.html) (AWS 方案指引）
+ [使用 Amazon RDS Custom](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-custom.html) (Amazon RDS 文件）
+ [使用 Amazon RDS Custom for Oracle 的僅供讀取複本](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-rr.html) (Amazon RDS 文件）
+ [Amazon RDS Custom for Oracle – 資料庫環境中的新控制功能 ](https://aws.amazon.com/blogs/aws/amazon-rds-custom-for-oracle-new-control-capabilities-in-database-environment/)(AWS 新聞部落格）
+ [在 AWS 上遷移 Oracle 電子商務套件](https://d1.awsstatic.com/whitepapers/migrate-oracle-e-business-suite.pdf) (AWS 白皮書）
+ [AWS 上的 Oracle E-Business Suite 架構](https://docs.aws.amazon.com/whitepapers/latest/overview-oracle-e-business-suite/oracle-e-business-suite-architecture-on-aws.html) (AWS 白皮書）