View a markdown version of this page

監控 SQL Server 切換 - Amazon Relational Database Service

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

監控 SQL Server 切換

若要檢查執行個體的狀態,請使用 AWS CLI 命令 describe-db-instances。下列命令會檢查資料庫執行個體 replica-to-be-made-primary 的狀態。此資料庫執行個體是切換前的僅供讀取複本,但切換後是新的主要資料庫執行個體。

aws rds describe-db-instances \ --db-instance-identifier replica-to-be-made-primary

您也可以在 Amazon RDS 主控台中確認角色變更。在資料庫頁面上,切換目標的角色值會從複本變更為來源。

若要尋找切換相關事件,請使用 AWS CLI 命令 describe-events。下列範例會在 replica-to-be-made-primary 執行個體上尋找事件。

aws rds describe-events \ --source-identifier replica-to-be-made-primary \ --source-type db-instance