

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

# 使用僅供讀取複本將 HA 新增至 Amazon RDS Custom 上的 Oracle PeopleSoft
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica"></a>

*sampath kathirvel，Amazon Web Services*

## 總結
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-summary"></a>

若要在 Amazon Web Services (AWS) 上執行 [Oracle PeopleSoft](https://www.oracle.com/applications/peoplesoft/) 企業資源規劃 (ERP) 解決方案，您可以使用 [Amazon Relational Database Service (Amazon RDS)](https://aws.amazon.com/rds/) 或 [Amazon RDS Custom for Oracle](https://aws.amazon.com/rds/custom/)，以支援需要存取基礎作業系統和資料庫環境的舊版、自訂和封裝應用程式。如需規劃遷移時要考量的關鍵因素，請參閱 AWS 方案指引中的 [Oracle 資料庫遷移策略](https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-oracle-database/strategies.html)。

截至本文撰寫為止，RDS Custom for Oracle 不支援[異地](https://aws.amazon.com/blogs/aws/multi-az-option-for-amazon-rds-oracle/)同步備份選項，此選項可供 [Amazon RDS for Oracle](https://aws.amazon.com/rds/oracle/) 做為使用儲存體複寫的 HA 解決方案使用。相反地，此模式會使用建立和維護主要資料庫實體副本的待命資料庫來實現 HA。此模式著重於使用 Oracle Data Guard 設定僅供讀取複本，在具有 HA 的 Amazon RDS Custom 上執行 PeopleSoft 應用程式資料庫的步驟。

此模式也會將僅供讀取複本變更為唯讀模式。讓僅供讀取複本處於唯讀模式可提供額外的優點：
+ 從主要資料庫卸載唯讀工作負載
+ 使用 Oracle Active Data Guard 功能從待命資料庫擷取運作狀態良好的區塊，以啟用損毀區塊的自動修復
+ 使用 Far Sync 功能讓遠端待命資料庫保持同步，而不會產生與長途重做日誌傳輸相關的效能額外負荷。

在唯讀模式下使用複本需要 [Oracle Active Data Guard](https://www.oracle.com/assets/technology-price-list-070617.pdf) 選項，因為這是 Oracle Database Enterprise Edition 的單獨授權功能，因此需要支付額外費用。

## 先決條件和限制
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-prereqs"></a>

**先決條件 **
+ Amazon RDS Custom 上的現有 PeopleSoft 應用程式。如果您沒有應用程式，請參閱將 [Oracle PeopleSoft 遷移至 Amazon RDS Custom](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-oracle-peoplesoft-to-amazon-rds-custom.html) 模式。
+ 單一 PeopleSoft 應用程式層。不過，您可以調整此模式以使用多個應用程式層。
+ Amazon RDS Custom 已設定至少 8 GB 的交換空間。
+ Oracle Active Data Guard 資料庫授權，可將僅供讀取複本轉換為唯讀模式，並使用它將報告任務卸載至待命。如需詳細資訊，請參閱 [Oracle Technology 商業價目表](https://www.oracle.com/corporate/pricing/#technology)。

**限制**** **
+ [RDS Custom for Oracle](https://docs.aws.amazon.com/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 資料庫版本，請參閱 [RDS Custom for Oracle](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RDS_Fea_Regions_DB-eng.Feature.RDSCustom.html#Concepts.RDS_Fea_Regions_DB-eng.Feature.RDSCustom.ora)。
+ 如需 Amazon RDS Custom 支援的 Oracle 資料庫執行個體類別，請參閱 [RDS Custom for Oracle 的資料庫執行個體類別支援](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-reqs-limits.html#custom-reqs-limits.instances)。

## Architecture
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-architecture"></a>

**目標技術堆疊**
+ Amazon RDS Custom for Oracle
+ AWS Secrets Manager
+ Oracle Active Data Guard
+ Oracle PeopleSoft 應用程式

**目標架構**

下圖顯示 Amazon RDS Custom 資料庫執行個體和 Amazon RDS Custom 僅供讀取複本。僅供讀取複本使用 Oracle Active Data Guard 複寫到另一個可用區域。您也可以使用僅供讀取複本卸載主要資料庫上的讀取流量，並用於報告目的。

![VPC 包含 AWS Secrets Manager、Amazon EFS、應用程式層和資料庫層。](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/7df4b2d0-b833-4ba3-98e4-a178db395d9d/images/463aefbe-70ad-4cd3-9ddc-0d8347e848c6.png)


如需在 AWS 上使用 Oracle PeopleSoft 的代表性架構，請參閱[在 AWS 上設定高可用性的 PeopleSoft 架構](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/set-up-a-highly-available-peoplesoft-architecture-on-aws.html)。

## 工具
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-tools"></a>

**AWS 服務**
+ [Amazon RDS Custom for Oracle](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/working-with-custom-oracle.html) 是一種受管資料庫服務，適用於需要存取基礎作業系統和資料庫環境的舊版、自訂和封裝應用程式。
+ [AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) 可協助您以 API 呼叫 Secrets Manager，以程式設計方式擷取秘密，取代程式碼中的硬式編碼登入資料，包括密碼。在此模式中，您會從秘密名稱`RDS_DATAGUARD`為 的 Secrets Manager 擷取資料庫使用者密碼`do-not-delete-rds-custom-+<<RDS Resource ID>>+-dg`。

**其他工具**
+ [Oracle Data Guard](https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/preface.html#GUID-B6209E95-9DA8-4D37-9BAD-3F000C7E3590) 可協助您建立、維護、管理和監控待命資料庫。

## 最佳實務
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-best-practices"></a>

若要朝零資料遺失 (RPO=0) 目標運作，請使用 `MaxAvailability` Data Guard 保護模式，並使用重做傳輸`SYNC+NOAFFIRM`設定以獲得更好的效能。如需選取資料庫保護模式的詳細資訊，請參閱*其他資訊*一節。

## 史詩
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-epics"></a>

### 建立僅供讀取複本
<a name="create-the-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 資料庫執行個體 （請參閱*先決條件*一節） 做為來源資料庫。<br />根據預設，Amazon RDS Custom 僅供讀取複本會建立為實體待命，且處於掛載狀態。這是為了確保符合 Oracle Active Data Guard 授權。<br />此模式包含用於設定多租戶容器資料庫 (CDB) 或非 CDB 執行個體的程式碼。 | DBA | 

### 將 Oracle Data Guard 保護模式變更為 MaxAvailability
<a name="change-oracle-data-guard-protection-mode-to-maxavailability"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 存取主要資料庫上的 Data Guard 代理程式組態。 | 在此範例中，Amazon RDS Custom 僅供讀取複本`RDS_CUSTOM_ORCL_D`適用於非 CDB 執行個體和 CDB `RDS_CUSTOM_RDSCDB_B` 執行個體。非 CDB 的資料庫為 `orcl_a`（主要） 和 `orcl_d`（待命）。CDB 的資料庫名稱為 `rdscdb_a`（主要） 和 `rdscdb_b`（待命）。<br />您可以直接或透過主要資料庫連線至 RDS Custom 僅供讀取複本。您可以在 `$ORACLE_HOME/network/admin`目錄中的 `tnsnames.ora` 檔案中找到資料庫的淨服務名稱。RDS Custom for Oracle 會自動為您的主要資料庫和僅供讀取複本填入這些項目。<br />`RDS_DATAGUARD` 使用者的密碼存放在 AWS Secrets Manager 中，秘密名稱為 `do-not-delete-rds-custom-+<<RDS Resource ID>>+-dg`。如需如何使用從 Secrets Manager 擷取的 SSH （安全殼層） 金鑰連線至 RDS Custom 執行個體的詳細資訊，請參閱[使用 SSH 連線至 RDS Custom 資料庫執行個體](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-creating.html#custom-creating.ssh)。<br />若要透過 Data Guard 命令列 (`dgmgrl`) 存取 Oracle Data Guard 代理程式組態，請使用下列程式碼。<br />**非 CDB**<pre>$ dgmgrl RDS_DATAGUARD@RDS_CUSTOM_ORCL_D<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Sep 30 22:44:49 2022<br />Version 19.10.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "ORCL_D"<br />Connected as SYSDG.<br />DGMGRL> <br />DGMGRL> show database orcl_d<br />Database - orcl_d<br />Role: PHYSICAL STANDBY<br />Intended State: APPLY-ON<br />Transport Lag: 0 seconds (computed 0 seconds ago)<br />Apply Lag: 0 seconds (computed 0 seconds ago)<br />Average Apply Rate: 11.00 KByte/s<br />Instance(s):<br />ORCL<br />SUCCESS<br />DGMGRL></pre><br />**CDB**<pre>-bash-4.2$ dgmgrl C##RDS_DATAGUARD@RDS_CUSTOM_RDSCDB_B<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Wed Jan 11 20:24:11 2023<br />Version 19.16.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "RDSCDB_B"<br />Connected as SYSDG.<br />DGMGRL><br />DGMGRL> show database rdscdb_b<br />Database - rdscdb_b<br />  Role:               PHYSICAL STANDBY<br />  Intended State:     APPLY-ON<br />  Transport Lag:      0 seconds (computed 1 second ago)<br />  Apply Lag:          0 seconds (computed 1 second ago)<br />  Average Apply Rate: 2.00 KByte/s<br />  Real Time Query:    OFF<br />  Instance(s):<br />    RDSCDB<br />Database Status:<br />SUCCESS<br />DGMGRL></pre> | DBA | 
| 從主節點連線至 DGMGRL 以變更日誌傳輸設定。 | 將日誌傳輸模式變更為 `FastSync`，對應於重做傳輸設定 `SYNC+NOAFFIRM`。為了確保您在角色切換後擁有有效的設定，請同時變更主要資料庫和待命資料庫。<br />**非 CDB**<pre>DGMGRL><br />DGMGRL> edit database orcl_d set property logxptmode=fastsync;<br />Property "logxptmode" updated<br />DGMGRL> show database orcl_d LogXptMode;<br />LogXptMode = 'fastsync'<br />DGMGRL> edit database orcl_a set property logxptmode=fastsync;<br />Property "logxptmode" updated<br />DGMGRL> show database orcl_a logxptmode;<br />LogXptMode = 'fastsync'<br />DGMGRL>   </pre><br />**CDB**<pre>DGMGRL> edit database rdscdb_b set property logxptmode=fastsync;DGMGRL> edit database rdscdb_b set property logxptmode=fastsync;<br />Property "logxptmode" updated<br />DGMGRL> show database rdscdb_b LogXptMode;<br />  LogXptMode = 'fastsync'<br />DGMGRL> edit database rdscdb_a set property logxptmode=fastsync;<br />Property "logxptmode" updated<br />DGMGRL> show database rdscdb_a logxptmode;<br />  LogXptMode = 'fastsync'<br />DGMGRL></pre> | DBA | 
| 將保護模式變更為 MaxAvailability。 | `DGMGRL` 從主節點`MaxAvailability`連線至 ，將保護模式變更為 。<br />**非 CDB**<pre>DGMGRL> edit configuration set protection mode as maxavailability;<br />Succeeded.<br />DGMGRL> show configuration;<br />Configuration - rds_dg<br />Protection Mode: MaxAvailability<br />Members:<br />orcl_a - Primary database<br />orcl_d - Physical standby database <br />Fast-Start Failover: Disabled<br />Configuration Status:<br />SUCCESS (status updated 38 seconds ago)<br />DGMGRL> </pre><br />**CDB**<pre>DGMGRL> show configuration<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_a - Primary database<br />    rdscdb_b - Physical standby database <br />Fast-Start Failover:  Disabled<br />Configuration Status:<br />SUCCESS   (status updated 57 seconds ago)<br />DGMGRL></pre> | DBA | 

### 將複本狀態從掛載變更為唯讀，並啟用重做
<a name="change-the-replica-status-from-mount-to-read-only-and-enable-redo-apply"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 停止重做會套用至待命資料庫。 | 依預設，僅供讀取複本會在 `MOUNT` 模式中建立。若要以唯讀模式開啟它，您必須先`DGMGRL`從主要節點或待命節點連線至 來關閉重做套用。<br />**非 CDB**<pre>DGMGRL> show database orcl_dDGMGRL> show database orcl_d<br />Database - orcl_d<br />Role: PHYSICAL STANDBY<br />Intended State: APPLY-ON<br />Transport Lag: 0 seconds (computed 1 second ago)<br />Apply Lag: 0 seconds (computed 1 second ago)<br />Average Apply Rate: 11.00 KByte/s<br />Real Time Query: OFF<br />Instance(s):<br />ORCL<br />Database Status:<br />SUCCESS<br />DGMGRL> edit database orcl_d set state=apply-off;<br />Succeeded.<br />DGMGRL> show database orcl_d<br />Database - orcl_d<br />Role: PHYSICAL STANDBY<br />Intended State: APPLY-OFF<br />Transport Lag: 0 seconds (computed 1 second ago)<br />Apply Lag: 42 seconds (computed 1 second ago)<br />Average Apply Rate: (unknown)<br />Real Time Query: OFF<br />Instance(s):<br />ORCL<br />Database Status:<br />SUCCESS<br />DGMGRL></pre><br />**CDB**<pre>DGMGRL> show configurationDGMGRL> show configuration<br />Configuration - rds_dg<br />  Protection Mode: MaxAvailability<br />  Members:<br />  rdscdb_a - Primary database<br />    rdscdb_b - Physical standby database <br />Fast-Start Failover:  Disabled<br />Configuration Status:<br />SUCCESS   (status updated 57 seconds ago)<br />DGMGRL> show database rdscdb_b;<br />Database - rdscdb_b<br />  Role:               PHYSICAL STANDBY<br />  Intended State:     APPLY-ON<br />  Transport Lag:      0 seconds (computed 1 second ago)<br />  Apply Lag:          0 seconds (computed 1 second ago)<br />  Average Apply Rate: 2.00 KByte/s<br />  Real Time Query:    OFF<br />  Instance(s):<br />    RDSCDB<br />Database Status:<br />SUCCESS<br />DGMGRL> edit database rdscdb_b set state=apply-off;<br />Succeeded.<br />DGMGRL> show database rdscdb_b;<br />Database - rdscdb_b<br />  Role:               PHYSICAL STANDBY<br />  Intended State:     APPLY-OFF<br />  Transport Lag:      0 seconds (computed 1 second ago)<br />  Apply Lag:          0 seconds (computed 1 second ago)<br />  Average Apply Rate: (unknown)<br />  Real Time Query:    OFF<br />  Instance(s):<br />    RDSCDB<br />Database Status:<br />SUCCESS</pre> | DBA | 
| 以唯讀模式開啟僅供讀取複本執行個體。 | 使用 TNS 項目連接至待命資料庫，並從主要節點或待命節點連接至待命資料庫，以唯讀模式開啟該資料庫。<br />**非 CDB**<pre>$ sqlplus RDS_DATAGUARD@RDS_CUSTOM_ORCL_D as sysdg<br />-bash-4.2$ sqlplus RDS_DATAGUARD@RDS_CUSTOM_ORCL_D as sysdg<br />SQL*Plus: Release 19.0.0.0.0 - Production on Fri Sep 30 23:00:14 2022<br />Version 19.10.0.0.0<br />Copyright (c) 1982, 2020, Oracle. All rights reserved.<br />Enter password: <br />Last Successful login time: Fri Sep 30 2022 22:48:27 +00:00<br />Connected to:<br />Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production<br />Version 19.10.0.0.0<br />SQL> select open_mode from v$database;<br />OPEN_MODE<br />--------------------<br />MOUNTED<br />SQL> alter database open read only;<br />Database altered.<br />SQL> select open_mode from v$database;<br />OPEN_MODE<br />--------------------<br />READ ONLY<br />SQL> </pre><br />**CDB**<pre>-bash-4.2$ sqlplus C##RDS_DATAGUARD@RDS_CUSTOM_RDSCDB_B as sysdg<br />SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 11 21:14:07 2023<br />Version 19.16.0.0.0<br />Copyright (c) 1982, 2022, Oracle.  All rights reserved.<br />Enter password: <br />Last Successful login time: Wed Jan 11 2023 21:12:05 +00:00<br />Connected to:<br />Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production<br />Version 19.16.0.0.0<br />SQL> select name,open_mode from v$database;<br />NAME   OPEN_MODE<br />--------- --------------------<br />RDSCDB   MOUNTED<br />SQL> alter database open read only;<br />Database altered.<br />SQL> select name,open_mode from v$database;<br />NAME   OPEN_MODE<br />--------- --------------------<br />RDSCDB   READ ONLY<br />SQL></pre> | DBA | 
| 在僅供讀取複本執行個體上啟用重做。 | 使用主要節點或待命節點中的 `DGMGR`L，在僅供讀取複本執行個體上啟用重做。<br />**非 CDB**<pre>$ dgmgrl RDS_DATAGUARD@RDS_CUSTOM_ORCL_D<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Sep 30 23:02:16 2022<br />Version 19.10.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "ORCL_D"<br />Connected as SYSDG.<br />DGMGRL> <br />edit database orcl_d set state=apply-on;<br />DGMGRL> edit database orcl_d set state=apply-on;<br />Succeeded.<br />DGMGRL> show database orcl_d<br />Database - orcl_d<br />Role: PHYSICAL STANDBY<br />Intended State: APPLY-ON<br />Transport Lag: 0 seconds (computed 0 seconds ago)<br />Apply Lag: 0 seconds (computed 0 seconds ago)<br />Average Apply Rate: 496.00 KByte/s<br />Real Time Query: ON<br />Instance(s):<br />ORCL<br />Database Status:<br />SUCCESS<br />DGMGRL></pre><br />**CDB**<pre>-bash-4.2$ dgmgrl C##RDS_DATAGUARD@RDS_CUSTOM_RDSCDB_B-bash-4.2$ dgmgrl C##RDS_DATAGUARD@RDS_CUSTOM_RDSCDB_B<br />DGMGRL for Linux: Release 19.0.0.0.0 - Production on Wed Jan 11 21:21:11 2023<br />Version 19.16.0.0.0<br />Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.<br />Welcome to DGMGRL, type "help" for information.<br />Password:<br />Connected to "RDSCDB_B"<br />Connected as SYSDG.<br />DGMGRL> edit database rdscdb_b set state=apply-on;<br />Succeeded.<br />DGMGRL> show database rdscdb_b           <br />Database - rdscdb_b<br />  Role:               PHYSICAL STANDBY<br />  Intended State:     APPLY-ON<br />  Transport Lag:      0 seconds (computed 0 seconds ago)<br />  Apply Lag:          0 seconds (computed 0 seconds ago)<br />  Average Apply Rate: 35.00 KByte/s<br />  Real Time Query:    ON<br />  Instance(s):<br />    RDSCDB<br />Database Status:<br />SUCCESS<br />DGMGRL> show database rdscdb_b   <br />Database - rdscdb_b<br />  Role:               PHYSICAL STANDBY<br />  Intended State:     APPLY-ON<br />  Transport Lag:      0 seconds (computed 1 second ago)<br />  Apply Lag:          0 seconds (computed 1 second ago)<br />  Average Apply Rate: 16.00 KByte/s<br />  Real Time Query:    ON<br />  Instance(s):<br />    RDSCDB<br />Database Status:<br />SUCCESS<br />DGMGRL></pre> | DBA | 

## 相關資源
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-resources"></a>
+ [將 Amazon RDS 設定為 Oracle PeopleSoft 資料庫](https://d1.awsstatic.com/whitepapers/configuring-amazon-rds-as-peoplesoft-database.pdf) (AWS 白皮書）
+ [Oracle Data Guard Broker 指南 ](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/index.html)(Oracle 參考文件）
+ [Data Guard 概念和管理 ](https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/index.html)(Oracle 參考文件）

## 其他資訊
<a name="add-ha-to-oracle-peoplesoft-on-amazon-rds-custom-by-using-a-read-replica-additional"></a>

**選取您的資料庫保護模式**

Oracle Data Guard 提供三種保護模式，根據您的可用性、保護和效能需求來設定 Data Guard 環境。下表摘要說明這三種模式。


| 
| 
| 保護模式 | 重做傳輸設定 | Description | 
| --- |--- |--- |
| ***最大效能*** | `ASYNC` | 對於主要資料庫上發生的交易，重做資料會以非同步方式傳輸並寫入待命資料庫重做日誌。因此，效能影響極小。<br />`MaxPerformance` 由於非同步日誌運送， 無法提供 RPO=0。 | 
| ***最大保護*** | `SYNC+AFFIRM` | 對於主要資料庫上的交易，在確認交易之前，重做資料會同步傳輸並寫入待命資料庫重做磁碟上的日誌。如果待命資料庫無法使用，主要資料庫會自行關閉，以確保交易受到保護。 | 
| ***最大可用性*** | `SYNC+AFFIRM` | 這類似於 `MaxProtection` 模式，除非未收到來自待命資料庫的確認。在這種情況下，它會像處於 `MaxPerformance` 模式一樣運作，以保留主要資料庫的可用性，直到能夠將其重做串流再次寫入同步待命資料庫為止。 | 
| `SYNC+NOAFFIRM` | 對於主要資料庫上的交易，重做會同步傳輸至待命資料庫，而主要只會等待確認已在待命上收到重做，而不是已寫入待命磁碟。此模式也稱為 `FastSync`，可在發生多個同時故障的特殊情況下，提供可能暴露於資料遺失的效能優勢。 | 

RDS Custom for Oracle 中的僅供讀取複本會以最大效能保護模式建立，這也是 Oracle Data Guard 的預設保護模式。最大效能模式可為主要資料庫提供最低的效能影響，這可協助您符合以秒為單位測量的復原點目標 (RPO) 需求。

若要實現零資料遺失 (RPO=0) 目標，您可以自訂 Oracle Data Guard 保護模式為 `MaxAvailability`，並使用 `SYNC+NOAFFIRM`設定進行重做傳輸以獲得更好的效能。由於只有在對應的重做向量成功傳輸到待命資料庫之後，才會確認主要資料庫上的遞交，因此主要執行個體和複本之間的網路延遲對於對遞交敏感的工作負載至關重要。我們建議您為工作負載執行負載測試，以評估在 僅供讀取複本自訂為在 `MaxAvailability` 模式下執行時的效能影響。

與在不同可用區域中部署僅供讀取複本相比，在與主要資料庫相同的可用區域中部署僅供讀取複本可提供較低的網路延遲。不過，在相同可用區域中部署主要和僅供讀取複本可能不符合您的 HA 需求，因為在極少數的可用區域無法使用的情況下，主要執行個體和僅供讀取複本執行個體都會受到影響。