

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

# 開啟 Amazon Aurora 的 Database Insights 的標準模式
<a name="USER_DatabaseInsights.TurningOnStandard"></a>

若要開啟 Amazon Aurora 的 Database Insights 的標準模式，請使用下列程序。

## 在建立資料庫叢集時，開啟 Database Insights 的標準模式
<a name="USER_DatabaseInsights.TurnOnCreateDatabaseStandard"></a>

建立 Amazon Aurora 的資料庫時，開啟 Database Insights 的標準模式。

------
#### [ Console ]

在此主控台中，您可以在建立資料庫叢集時開啟 Database Insights 的標準模式。Database Insights 的設定適用於資料庫叢集中的所有資料庫執行個體。

**使用主控台建立資料庫叢集時，開啟 Database Insights 的標準模式**

1. 登入 AWS 管理主控台 ，並在 [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/)：// 開啟 Amazon RDS 主控台。

1. 選擇 **Databases** (資料庫)。

1. 選擇**建立資料庫**。

1. 在 **Database Insights** 區段中，選取**標準模式**。然後，從下列選項中選擇以開啟或關閉 Performance Insights：
   + 若要關閉 Performance Insights，請取消選取**啟用 Performance Insights**。
   + 若要開啟 Performance Insights，請選取**啟用 Performance Insights**。若要設定 Performance Insights，請指定下列選項：
     + **Retention (保留)** – 保留 Performance Insights 資料的時間。保留期間必須至少為 7 天。
     + **AWS KMS key** – 指定您的 KMS 金鑰。績效詳情使用您的 KMS 金鑰來加密所有可能的敏感資料。將會對傳輸中與靜態資料進行加密。如需詳細資訊，請參閱[加密 Amazon Aurora 資源](Overview.Encryption.md)。

1. 選擇**建立資料庫**。

------
#### [ AWS CLI ]

若要在建立資料庫叢集時開啟 Database Insights 的標準模式，請呼叫 [create-db-cluster](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-cluster.html) AWS CLI 命令並提供下列值：
+ `--database-insights-mode standard` 以開啟 Database Insights 的標準模式。
+ `--engine` – 資料庫叢集的資料庫引擎。
+ `--db-cluster-identifier` – 資料庫叢集的識別碼。
+ `--enable-performance-insights` 或 `--no-enable-performance-insights` 以開啟或關閉 Performance Insights。如果您指定 `--enable-performance-insights`，還必須指定 `--performance-insights-retention-period` – 資料庫叢集資料的保留期間。保留期間必須至少為 7 天。

下列範例會在建立資料庫叢集時啟用 Database Insights 和 Performance Insights 的標準模式。

針對 Linux、macOS 或 Unix：

```
aws rds create-db-cluster \
    --database-insights-mode standard \ 
    --engine aurora-postgresql \
    --db-cluster-identifier sample-db-identifier \
    --enable-performance-insights \
    --performance-insights-retention-period 7
```

針對 Windows：

```
aws rds create-db-cluster ^
    --database-insights-mode standard ^ 
    --engine aurora-postgresql ^
    --db-cluster-identifier sample-db-identifier ^
    --enable-performance-insights ^
    --performance-insights-retention-period 7
```

下列範例會在建立資料庫叢集時，啟用 Database Insights 的標準模式及停用 Performance Insights。

針對 Linux、macOS 或 Unix：

```
aws rds create-db-cluster \
    --database-insights-mode standard \ 
    --engine aurora-postgresql \
    --db-cluster-identifier sample-db-identifier \
    --no-enable-performance-insights
```

針對 Windows：

```
aws rds create-db-cluster ^
    --database-insights-mode standard ^ 
    --engine aurora-postgresql ^
    --db-cluster-identifier sample-db-identifier ^
    --no-enable-performance-insights
```

------
#### [ RDS API ]

若要在建立資料庫叢集時開啟 Database Insights 的標準模式，請為您的 [CreateDBCluster](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html) Amazon RDS API 操作指定下列參數。
+ `DatabaseInsightsMode` 至 `standard`
+ `EnablePerformanceInsights` 設為 `True` 或 `False`。如果您將 `EnablePerformanceInsights` 設定為 `True`，您必須將 `PerformanceInsightsRetentionPeriod` 設定為至少 7 天。

------

## 在修改資料庫叢集時，開啟 Database Insights 的標準模式
<a name="USER_DatabaseInsights.TurnOnModifyDatabaseStandard"></a>

修改 Amazon Aurora 的資料庫時，開啟 Database Insights 的標準模式。修改資料庫叢集以啟用 Database Insights 的標準模式不會導致停機時間。

**注意**  
若要啟用 Database Insights，資料庫叢集中的每個資料庫執行個體都必須具有相同的 Performance Insights 和增強型監控設定。

------
#### [ Console ]

在此主控台中，您可以在修改資料庫叢集時開啟 Database Insights 的標準模式。Database Insights 的設定適用於資料庫叢集中的所有資料庫執行個體。

**使用主控台修改資料庫叢集時，開啟 Database Insights 的標準模式**

1. 登入 AWS 管理主控台 ，並在 [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/)：// 開啟 Amazon RDS 主控台。

1. 選擇 **Databases** (資料庫)。

1. 選擇一個資料庫執行個體，然後選擇 **Modify** (修改)。

1. 在 **Database Insights** 區段中，選取**標準模式**。然後，從以下選項中選擇：
   + 若要關閉 Performance Insights，請取消選取**啟用 Performance Insights**。
   + 若要開啟 Performance Insights，請選取**啟用 Performance Insights**。若要設定 Performance Insights，請指定下列選項：
     + **Retention (保留)** – 保留 Performance Insights 資料的時間。保留期間必須至少為 7 天。
     + **AWS KMS key** – 指定您的 KMS 金鑰。績效詳情使用您的 KMS 金鑰來加密所有可能的敏感資料。將會對傳輸中與靜態資料進行加密。如需更多詳細資訊，請參閱 [加密 Amazon Aurora 資源](Overview.Encryption.md)。

1. 選擇 **Continue** (繼續)。

1. 在 **Scheduling of Modifications (修改排程)** 中，選擇 **Apply immediately (立即套用)**。如果您選擇**在下一個排定的維護時段套用**，則資料庫會忽略此設定，並立即開啟 Database Insights 的標準模式。

1. 選擇**修改叢集**。

------
#### [ AWS CLI ]

若要在修改資料庫叢集時開啟 Database Insights 的標準模式，請呼叫 [modify-db-cluster](https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-cluster.html) AWS CLI 命令並提供下列值：
+ `--database-insights-mode standard` 以開啟 Database Insights 的標準模式。
+ `--db-cluster-identifier` – 資料庫叢集的識別碼。
+ `--enable-performance-insights` 或 `--no-enable-performance-insights` 以開啟或關閉 Performance Insights。如果您指定 `--enable-performance-insights`，還必須指定 `--performance-insights-retention-period` – 資料庫叢集的資料保留期間。保留期間必須至少為 7 天。

下列範例會在修改資料庫叢集時啟用 Database Insights 的標準模式及啟用 Performance Insights。

針對 Linux、macOS 或 Unix：

```
aws rds modify-db-cluster \
    --database-insights-mode standard \
    --db-cluster-identifier sample-db-identifier \
    --enable-performance-insights \
    --performance-insights-retention-period 7
```

針對 Windows：

```
aws rds modify-db-cluster ^
    --database-insights-mode standard ^
    --db-cluster-identifier sample-db-identifier ^
    --enable-performance-insights ^
    --performance-insights-retention-period 7
```

下列範例會在修改資料庫叢集時啟用 Database Insights 的標準模式及停用 Performance Insights。

針對 Linux、macOS 或 Unix：

```
aws rds modify-db-cluster \
    --database-insights-mode standard \
    --db-cluster-identifier sample-db-identifier \
    --no-enable-performance-insights
```

針對 Windows：

```
aws rds modify-db-cluster ^
    --database-insights-mode standard ^
    --db-cluster-identifier sample-db-identifier ^
    --no-enable-performance-insights
```

------
#### [ RDS API ]

若要在修改資料庫叢集時開啟 Database Insights 的標準模式，請為 [ModifyDBCluster](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBCluster.html) Amazon RDS API 操作指定下列參數。
+ `DatabaseInsightsMode` 至 `standard`
+ `EnablePerformanceInsights` 設為 `True` 或 `False`。如果您將 `EnablePerformanceInsights` 設定為 `True`，您必須將 `PerformanceInsightsRetentionPeriod` 設定為至少 7 天。

------