13 Oracle Database Applianceでの障害管理およびリカバリのためのOracle Data Guardの使用
Oracle Database Applianceでの障害管理およびリカバリにOracle Data Guardを使用する方法を説明します。
- Oracle Database Appliance上のOracle Data Guardについて
Oracle Database Applianceには、高可用性、データ保護および障害リカバリのためのOracle Data Guardを簡単に構成および管理できるように、ODACLIコマンドおよびBUIによるクライアント・インタフェースが用意されています。 - Oracle Database ApplianceでのOracle Data Guardを使用した複数のスタンバイ・データベースのデプロイ
このリリースでは、Oracle Database Applianceは複数のスタンバイ・データベースを使用したOracle Data Guard構成をサポートしています。 - Oracle Database ApplianceでのOracle Data Guardの構成
Oracle Database Applianceでは、ODACLIコマンドを使用してOracle Data Guardを設定できます。 - BUIを使用したOracle Database ApplianceでのOracle Data Guardの構成
Oracle Database Applianceでは、BUIを使用してOracle Data Guardを設定できます。 - Oracle Database ApplianceでのOracle Data Guardのステータスの表示
ODACLIコマンドを使用してOracle Data Guardのステータスを表示します。 - BUIを使用したOracle Database ApplianceでのOracle Data Guardのステータスの表示
BUIを使用してOracle Data Guardのステータスを表示します。 - Oracle Data Guardの操作の実行
ODACLIコマンドを使用して、Oracle Data Guardでフェイルオーバー、スイッチオーバーおよび回復操作を実行します。 - BUIを使用したOracle Data Guardの操作の実行
BUIを使用して、Oracle Data Guardでフェイルオーバー、スイッチオーバーおよび回復操作を実行します。 - Oracle Data Guardネットワークの作成
ODACLIコマンドを使用してOracle Data Guardネットワークを作成し、データベースに関連付けます。 - 統合されたOracle Data Guardを使用したあるシステムから別のシステムへのOracle Databaseの移行
統合されたOracle Data Guardを使用して、あるシステムから別のシステムにOracle Databaseを移行する方法を説明します。 - Oracle Database ApplianceでのOracle Data Guardデータベースへのパッチ適用
ODACLIコマンドを使用してOracle Data Guardでプライマリ・データベースとスタンバイ・データベースにパッチを適用する方法を説明します。 - 既存の構成でのOracle Active Data Guardの有効化
既存の構成でOracle Active Data Guardを有効にする方法を説明します。 - ODACLIコマンドを使用したOracle Database ApplianceでのOracle Data Guardの登録
Oracle Database Applianceでは、手動で構成されたOracle Data Guard構成を移行し、ODACLIコマンドを使用して構成メタデータをOracle Database Applianceに登録できます。 - BUIを使用したOracle Database ApplianceでのOracle Data Guardの登録
Oracle Database Applianceでは、手動で構成されたOracle Data Guard構成を移行し、BUIを使用して構成メタデータをOracle Database Applianceに登録できます。 - Oracle Database ApplianceでのOracle Data Guardの構成解除
ODACLIコマンドを使用してOracle Data Guardのステータスを構成解除します。 - BUIを使用したOracle Database ApplianceでのOracle Data Guardの構成解除
BUIを使用してOracle Data Guardのステータスを構成解除します。
Oracle Database Appliance上のOracle Data Guardについて
Oracle Database Applianceには、高可用性、データ保護および障害リカバリのためのOracle Data Guardを簡単に構成および管理できるように、ODACLIコマンドおよびBUIによるクライアント・インタフェースが用意されています。
Oracle Data Guardは、1つ以上のスタンバイ・データベースを作成、管理および監視する包括的なサービスのセットを提供して、本番環境のOracleデータベースが障害およびデータ破損の影響を受けないようにします。Oracle Data Guardは、スタンバイ・データベースを本番データベースのコピーとして管理します。これにより、計画停止または計画外停止のために本番データベースを使用できなくなった場合に、Oracle Data Guardがスタンバイ・データベースを本番ロールに切り替えることができるため、停止時間が最小化されます。Oracle Data Guardは、従来のバックアップ、リストアおよびクラスタ技術とともに使用して、高レベルのデータ保護およびデータ可用性を提供できます。Oracle Data Guard転送サービスは、ソース・データベースから1つ以上のリモート宛先への効率的で信頼性の高いREDO転送を実現できるため、Oracle StreamsやOracle GoldenGateなど、他のOracleの機能でも使用されます。
Oracle Data Guardを使用すると、管理者はリソース集中型のバックアップおよびレポート作成操作をスタンバイ・システムにオフロードすることで、本番データベースのパフォーマンスをオプションで改善できます。
スタンバイ・システムでクローン・データベースを作成する機能によって、スタンバイ・データベースに基づいてテスト環境または開発環境を設定できます。スタンバイ・システムは本番システムではないため、テスト環境または開発環境のシードにより適しています。
ノート:
Oracle Database Enterprise Editionには、Oracle Data Guardが付属しています。Oracle Database ApplianceでのOracle Data Guardを使用した複数のスタンバイ・データベースのデプロイ
このリリースでは、Oracle Database Applianceは複数のスタンバイ・データベースを使用したOracle Data Guard構成をサポートしています。
Oracle Data Guard構成を使用して複数のスタンバイ・データベースをデプロイするための前提条件
- プライマリ・データベースとスタンバイ・データベースは、異なるOracle Database Applianceシステム上に存在する必要があります。
- 複数のスタンバイ構成の場合は、3つのOracle Database Appliance DBシステムをデプロイする必要があります。
odacli configure-dataguard
コマンドまたはJSONファイルで値を指定することで、複数のスタンバイ・データベースをデプロイできます。
ノート:
このリリースでは、Oracle Data Guard構成で最大2つのスタンバイ・データベースを構成できます。ノート:
すべてのスタンバイ・データベースは、Oracle Data Guard構成時(odacli configure-dataguard
コマンドの実行時)にのみ構成できます。後で追加のスタンバイ・データベースを構成することはできません。
Oracle Database ApplianceでのOracle Data Guardの構成
Oracle Database Applianceでは、ODACLIコマンドを使用してOracle Data Guardを設定できます。
Oracle Database Guardの構成の前提条件
- プライマリ・データベースとスタンバイ・データベースを別のOracle Database Applianceハードウェアで実行することをお薦めします。そのため、少なくとも2つの別々のOracle Database Applianceマシンがあることを確認してください。
- プライマリ・システムとスタンバイ・システムのOracle Database Appliance構成を同じにすることをお薦めします。データベース・スイッチ・ロールの予測できない事態を回避するために、データベースのデータベース・バージョンとストレージの構成が同じである必要があります(Oracle ASMまたはOracle ACFSストレージである必要がある)。
- プライマリ・システムとスタンバイ・システムのOracle Database Applianceリリースが同じで、Oracle Database Applianceリリース19.22以降である必要があります。
- オペレーティング・システムをカスタマイズした場合は、システムの環境が同じであることを確認します。
- デプロイメントがOracle Maximum Availability Architecture (MAA)のベスト・プラクティスに従っていることを確認します。Oracle Technology NetworkのOracle Maximum Availability Architecture (MAA)のページを参照してください。
- バックアップおよびリカバリにOracle ObjectStoreを使用する場合は、プライマリ・システムとスタンバイ・システムにアクセスを構成する必要があります。
Oracle Database Guardの構成のバックアップおよびリカバリの設定
Oracle Database ApplianceでOracle Data Guardを構成するときに、オブジェクト・ストアまたは外部FRA (NFS)を使用して、プライマリ・データベースとスタンバイ・データベースのバックアップを設定できます。スタンバイ・データベースをインスタンス化するには、バックアップが必要です。
- エージェント・プロキシ設定を構成します。
# odacli modify-agentconfig-parameters -n HttpProxyHost -v www-proxy.test.com -n HttpProxyPort -v 80 -u
詳細は、このガイドのオブジェクト・ストア・アクセス用のエージェント・プロキシ設定の構成のトピックを参照してください。
- プライマリ・システムとスタンバイ・システムの両方にオブジェクト・ストア資格証明を作成します。
# odacli create-objectstoreswift -e swift_end_point_URL -n Object Store_Swift_name -t Object_Store_tenant_name -u Object_Store_user_name
たとえば:
# odacli create-objectstoreswift -e https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1 -n aaa -t test_user -u testuser
- オブジェクト・ストアのSwift名を表示します。
# odacli list-objectstoreswifts
- バックアップ構成を作成します。
# odacli create-backupconfig -d objectstore -c testuser -on aaa -w 7 -cr -n backupConfig7days
- バックアップ構成をデータベースに関連付けます。
# odacli modify-database -n test_db -bin backupConfig7days -bp
- バックアップ構成を作成します。高可用性デプロイメントの場合は、1つのノードでのみコマンドを実行します。
# odacli create-backupconfig -n nfsbkup -w 10 -d NFS -c /u01/nfs_backup
- バックアップ構成をデータベースに関連付けます。
# odacli modify-database -n test_db -bin nfsbkup
ODACLIコマンドを使用したOracle Data Guardの構成
次のステップに従います。
- プライマリ・データベースのバックアップをオブジェクト・ストアまたは外部FRA (NFS)に作成します。
# odacli create-backup --backupType Regular-L0 -n primary_DB
たとえば:# odacli create-backup --backupType Regular-L0 -n test_db
- バックアップ・レポートを保存します。
# odacli describe-backupreport -i eba406c7-ae46-4d1d-a1e5-3e985397b171 > backup_report_test_db_0620.json
バックアップ・レポートIDは、ステップ1で作成したバックアップのIDであり、
odacli list-backupreports
コマンドを実行して取得できます。 - バックアップ・レポートをスタンバイ・システムにコピーし、バックアップをスタンバイ・データベースにリストアします。Oracle Database ApplianceのOracle Data Guard構成でロールをスタンバイとしてデータベースを作成するために、TDE対応データベースにOracle Key Vaultキーストアを使用する場合、プライマリ・データベースのウォレットをコピーする必要がないことに注意してください。
odacli irestore-database
コマンドで同じウォレットを指定できます。# odacli irestore-database -ro STANDBY
オブジェクト・ストアを使用する場合は、オブジェクト・ストアの場所を指定します。
# odacli irestore-database -r backup_report.json -u dbUniqueName -on objectStoreName -bp -ro STANDBY Rman Backup Encryption Password(s). Multiple passwords needs to be comma separated.: Password for SYS user:
前述のコマンドで、スタンバイ・システムの
dbUniqueName
を指定します。odacli irestore-database -r backup_report.json -u dbUniqueName -ro STANDBY Password for SYS user:
- プライマリ・システムで
odacli configure-dataguard
コマンドを実行して、Oracle Data Guardを構成します。対話型コマンドライン・インタフェースを使用して、構成の値を指定します。対話型CLIの構成手順では、パラメータは次のようになります。- スタンバイ・サイト・アドレスは、スタンバイ・ホストのIPアドレスまたはホスト名です。プライマリ・システムとスタンバイ・システムが同じドメイン内にあり、DNSが構成されている場合は、完全修飾ドメイン名とホスト名を指定します。
- 複数のスタンバイ・データベースを指定できます。
- 複数のスタンバイ・データベースの場合、マルチユーザー・アクセス対応でないシステムでは、デフォルトのユーザー名を
oda-admin
のままにします。プロンプトが表示されたら、oda-admin
ユーザーのBUIパスワードおよびroot
ユーザーのオペレーティング・システム・パスワードを指定します。# odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: standby1 BUI username for Standby site standby. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby1: Password for root user on Standby site standby1: Standby 2 site address: standby2 BUI username for Standby site standby2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby2: Password for root user on Standby site standby2:
- 複数のスタンバイ・データベースの場合は、マルチユーザー・アクセス対応システムで、スタンバイ・データベースをリストアしたユーザー名を指定します。プロンプトが表示されたら、同じユーザーのBUIパスワードを指定します。
# odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): u1 BUI password for Standby site standby1. If Multi-user Access Passwordless is enabled on Standby site, copy the cwallet.sso file from Standby site (/opt/oracle/dcs/conf/dcspublickey_wallet/) to Primary site (/root/). Rename the file to 'cwallet.sso.standby1', set the file ownership (root:root) and file permission (0440) and then press enter: Standby 2 site address: standby2 BUI username for Standby site standby2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): usr1 BUI password for Standby site standby2. If Multi-user Access Passwordless is enabled on Standby site, copy the cwallet.sso file from Standby site (/opt/oracle/dcs/conf/dcspublickey_wallet/) to Primary site (/root/). Rename the file to 'cwallet.sso.standby2', set the file ownership (root:root) and file permission (0440) and then press enter:
- 複数のスタンバイ・データベースの場合は、パスワードなしのマルチユーザー・アクセス・システムで、スタンバイ・データベースをリストアしたユーザー名を指定します。ウォレットをコピーするよう求められます。対話型コマンド・フローの手順に従います。
# odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): u1 BUI password for Standby site standby1. If Multi-user Access Passwordless is enabled on Standby site, copy the cwallet.sso file from Standby site (/opt/oracle/dcs/conf/dcspublickey_wallet/) to Primary site (/root/). Rename the file to 'cwallet.sso.standby1', set the file ownership (root:root) and file permission (0440) and then press enter: Standby 2 site address: standby2 BUI username for Standby site standby2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): usr1 BUI password for Standby site standby2. If Multi-user Access Passwordless is enabled on Standby site, copy the cwallet.sso file from Standby site (/opt/oracle/dcs/conf/dcspublickey_wallet/) to Primary site (/root/). Rename the file to 'cwallet.sso.standby2', set the file ownership (root:root) and file permission (0440) and then press enter:
- 可用性、パフォーマンスおよびデータ保護の要件を満たすOracle Data Guardの保護モードを選択します。Oracle Data Guardの保護モードは、最大可用性、最大パフォーマンスおよび最大保護です。ログ転送モードは、ASYNC、SYNCおよびFASTSYNCです。
保護モードと転送タイプの次の組合せを選択できます。
表13-1 Oracle Data Guardの保護モードとトランスポート・モード
保護モード\転送タイプ ASYNC FASTSYNC** SYNC MAXPERFORMANCE Y* Y Y MAXAVAILABILITY N Y Y* MAXPROTECTION N N Y* 表内の*は、サポートされるデフォルトのペアを示します。** FASTSYNCモードはOracle Database 12.1以上でのみ使用できます。
1つのスタンバイ構成の例:
# odacli configure-dataguard # /opt/oracle/dcs/bin/odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): Standby 1 site address: phxdbfzp04.dev3farm3phx.databasede3phx BUI username for Standby site host1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site phxdbfzp04.dev3farm3phx.databasede3phx, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): oda-admin BUI password for Standby site host2: Password for root user on Standby site host2: ******************************************************************************************* Data Guard configuration name: tdb_dg Database name for Data Guard configuration: tdb Primary database SYS password: Protection mode [MAX_PROTECTION, MAX_PERFORMANCE, MAX_AVAILABILITY] (default: MAX_PERFORMANCE): Enable Active Data Guard (Y/N, default:N): ******************************************************************************************* Data Guard default settings for standby database - tdbstndby Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC Do you want to edit this Data Guard configuration? (Y/N, default:N): N ******************************************************************************************* Enter Primary database RMAN backup encryption password if any: Do you want to provide another Primary database RMAN backup encryption password if any? [y/n] (default 'n'): Standby database's SYS password will be set to Primary database's after Data Guard configuration. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): Y { "jobId" : "e02cc0b3-bce3-4d6c-a1f5-5b121bb7f66a", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "January 23, 2025 03:12:44 AM UTC", "resourceList" : [ ], "description" : "DG Config service for DB tdb", "updatedTime" : "January 23, 2025 03:12:44 AM UTC", "jobType" : null, "cpsMetadata" : null } [root@host1 work]# /opt/oracle/dcs/bin/odacli describe-job -i e02cc0b3-bce3-4d6c-a1f5-5b121bb7f66a Job details ---------------------------------------------------------------- ID: e02cc0b3-bce3-4d6c-a1f5-5b121bb7f66a Description: DG Config service for DB tdb Status: Success Created: January 23, 2025 03:12:44 UTC Message: Task Name Start Time End Time Status ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------- Validate configure primary request January 23, 2025 03:13:10 UTC January 23, 2025 03:13:21 UTC Success (Primary site) (Host: host1/Job ID: 901389f5-0cad-4ee6-91be-3f77b85652af) Validate configure standby request January 23, 2025 03:13:21 UTC January 23, 2025 03:13:29 UTC Success (Standby site) (Host: host2/Job ID: 856d86e4-dd51-41a7-9050-b0c39ae771f9) Uploading Primary DB Password File January 23, 2025 03:13:29 UTC January 23, 2025 03:13:52 UTC Success (Standby site) Configure primary database (Primary January 23, 2025 03:13:52 UTC January 23, 2025 03:15:29 UTC Success site) (Host: host1/Job ID: 5dd46e86-e07f-423f-9ebf-2515b4ac17d5) Configure standby request (Standby January 23, 2025 03:15:29 UTC January 23, 2025 03:17:30 UTC Success site) (Host: host2/Job ID: 2ab511a2-15c0-4371-bf30-9b7e27ff5288) Create archive log restore (Primary January 23, 2025 03:17:30 UTC January 23, 2025 03:17:52 UTC Success site) (Host: host1/Job ID: 96766874-6537-4972-81a9-971440e2acfb) Configure and enable Data Guard January 23, 2025 03:17:53 UTC January 23, 2025 03:19:19 UTC Success (Primary site) (Host: host1/Job ID: 7ad65ffa-ea06-479d-bb21-e0b81fb8c743) Enable Flashback (Standby site) (Host: January 23, 2025 03:19:19 UTC January 23, 2025 03:19:38 UTC Success host2/Job ID: a1768703-4dd4-4f1f-b9a3-9fe0f99615d5) Re-enable Data Guard (Primary site) January 23, 2025 03:19:38 UTC January 23, 2025 03:19:44 UTC Success (Host: host1/Job ID: 3f6dd276-63e3-4804-a179-e10052386206) Create Data Guard status (Primary January 23, 2025 03:19:44 UTC January 23, 2025 03:19:49 UTC Success site) (Host: host1/Job ID: 8a3eb946-3501-4618-9d4a-ad8a6d298cc8) Create Data Guard status (Standby January 23, 2025 03:19:49 UTC January 23, 2025 03:19:57 UTC Success site) (Host: host2/Job ID: d9d65942-6284-40d5-a991-b1d21edae96f)
2つのスタンバイ・データベース構成の例:# odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby1: Password for root user on Standby site standby1: Standby 2 site address: standby2 BUI username for Standby site standby2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby2: Password for root user on Standby site standby2: ******************************************************************************************* Data Guard configuration name: dgbb Database name for Data Guard configuration: bb Primary database SYS password: Protection mode [MAX_PROTECTION, MAX_PERFORMANCE, MAX_AVAILABILITY] (default: MAX_PERFORMANCE): Enable Active Data Guard (Y/N, default:N): ******************************************************************************************* Data Guard default settings for standby database - bb1 Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC Do you want to edit this Data Guard configuration? (Y/N, default:N): Data Guard default settings for standby database - bb2 Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC Do you want to edit this Data Guard configuration? (Y/N, default:N): Warning: in compliance with Oracle MAA best practices. DbType (RAC) of Primary database bb is different from DbType (SI) of Standby database. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): y Warning: in compliance with Oracle MAA best practices. DbType (RAC) of Primary database bb is different from DbType (SI) of Standby database. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): y ******************************************************************************************* Enter Primary database RMAN backup encryption password if any: Do you want to provide another Primary database RMAN backup encryption password if any? [y/n] (default 'n'): Standby database's SYS password will be set to Primary database's after Data Guard configuration. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): y { "jobId" : "f1df87d7-221c-4dc3-a15f-fa35d91560f5", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "January 17, 2025 22:57:55 PM UTC", "resourceList" : [ ], "description" : "DG Config service for DB bb", "updatedTime" : "January 17, 2025 22:57:55 PM UTC", "jobType" : null, "cpsMetadata" : null } [root@host1 ~]# odacli describe-job -i "f1df87d7-221c-4dc3-a15f-fa35d91560f5" Job details ---------------------------------------------------------------- ID: f1df87d7-221c-4dc3-a15f-fa35d91560f5 Description: DG Config service for DB bb Status: Success Created: January 17, 2025 22:57:55 UTC Message: Task Name Node Name Start Time End Time Status ---------------------------------------- --------------------------------------------------------------------------------------------------------- ---------------- Validate configure primary request host1 January 17,2025 22:58:38 UTC January 17, 2025 22:58:44 UTC Success (Primary site) (Host:host1/Job ID: eb8bbb43-159c-48e0-8dda-9e2bbd280669) Validate configure standby request host1 January 17,2025 22:58:44 UTC January 17, 2025 22:58:52 UTC Success (Standby site) (Host: standby1/Job ID: 86345f35-500c-4ba8-8ff9-f97c201ad3c7) Uploading Primary DB Password File host1 January 17,2025 22:58:52 UTC January 17, 2025 22:59:07 UTC Success (Standby site) Configure primary database (Primary host1 January 17,2025 22:59:07 UTC January 17, 2025 22:59:58 UTC Success site) (Host: host1/Job ID: 23ee7263-a59e-40bd-bbec-4c17a5d4ba99) Configure standby request (Standby host1 January 17,2025 22:59:58 UTC January 17, 2025 23:02:00 UTC Success site) (Host: standby1/Job ID: af543839-85ba-4e83-89d3-af161d528256) Create archive log restore (Primary host1 January 17,2025 23:02:00 UTC January 17, 2025 23:02:37 UTC Success site) (Host: host1/Job ID: b2940217-cec6-4b22-92d2-f4ec8f26b8b8) Configure and enable Data Guard host1 January 17,2025 23:02:37 UTC January 17, 2025 23:04:19 UTC Success (Primary site) (Host: host1/Job ID: 7882e1e5-0d71-48df-bd86-e79ee6b57a21) Enable Flashback (Standby site) (Host: host1 January 17,2025 23:04:19 UTC January 17, 2025 23:04:37 UTC Success standby1/Job ID: c2ef962c-f429-4e97-8bc3-1355cd7d0ca8) Re-enable Data Guard (Primary site) host1 January 17,2025 23:04:37 UTC January 17, 2025 23:04:43 UTC Success (Host: host1/Job ID: fb4a7055-0049-4d44-a726-0871ed54ca07) Create Data Guard status (Primary host1 January 17,2025 23:04:43 UTC January 17, 2025 23:04:54 UTC Success site) (Host: host1/Job ID: 5aca5c16-632f-488b-aade-1c677030c81d) Create Data Guard status (Standby host1 January 17,2025 23:04:54 UTC January 17, 2025 23:05:07 UTC Success site) (Host: standby1/Job ID: 5f0c5460-4c38-4aed-8a5b-e70c0ca70df8) Validate configure primary request host1 January 17,2025 23:05:07 UTC January 17, 2025 23:05:13 UTC Success (Primary site) (Host:host1/Job ID: 5ac64b32-5da6-48df-b8cc-020853363695) Validate configure standby request host1 January 17,2025 23:05:13 UTC January 17, 2025 23:05:21 UTC Success (Standby site) (Host: standby2/Job ID: 81aa6900-4460-408e-9ab2-fdcd92c8b7bf) Uploading Primary DB Password File host1 January 17,2025 23:05:21 UTC January 17, 2025 23:05:32 UTC Success (Standby site) Configure primary database (Primary host1 January 17,2025 23:05:32 UTC January 17, 2025 23:06:14 UTC Success site) (Host: host1/Job ID: c78a8072-8023-4278-bd94-3dd1ef97e066) Configure standby request (Standby host1 January 17,2025 23:06:14 UTC January 17, 2025 23:07:43 UTC Success site) (Host: standby2/Job ID: 46274a35-bb06-43a9-a8a5-66dc4d163463) Create archive log restore (Primary host1 January 17,2025 23:07:43 UTC January 17, 2025 23:08:15 UTC Success site) (Host: host1/Job ID: 2b20aaa2-fcb7-4bc5-b501-27ad9d45f34b) Configure standby TNS entry (New host1 January 17,2025 23:08:15 UTC January 17, 2025 23:08:24 UTC Success standby site) (Host: standby2/Job ID: 7e32db8c-999c-44fa-bdf5-3aed77c9590c) Configure standby TNS entry (Existing host1 January 17,2025 23:08:24 UTC January 17, 2025 23:08:28 UTC Success standby site) (Host: standby1/Job ID: 6a44539e-d5b9-4c45-ad2c-7bff8c871e37) Add standby database (Primary site) host1 January 17,2025 23:08:28 UTC January 17, 2025 23:09:50 UTC Success (Host: host1/Job ID: 1d7c6c93-bd85-496a-bb7d-67ae7b224d58) Enable Flashback (Standby site) (Host: host1 January 17,2025 23:09:50 UTC January 17, 2025 23:10:03 UTC Success standby2/Job ID: 4a6b8623-efc0-4016-80be-305b0ed56363) Re-enable Data Guard (Primary site) host1 January 17,2025 23:10:03 UTC January 17, 2025 23:10:09 UTC Success (Host: host1/Job ID: 2afea759-752a-42a4-a077-bd85d4b687a3) Update Data Guard status (Primary host1 January 17,2025 23:10:09 UTC January 17, 2025 23:10:35 UTC Success site) (Host: host1/Job ID: 11d93988-ea4d-4e37-af30-763c2522693d) Create Data Guard status (New standby host1 January 17,2025 23:10:35 UTC January 17, 2025 23:10:53 UTC Success site) (Host: standby2/Job ID: aa5b286f-30f1-48d1-8c2d-2490d15ce408) Update Data Guard status (Existing host1 January 17,2025 23:10:53 UTC January 17, 2025 23:11:06 UTC Success standby site) (Host: standby1/JobID: 7d8ffa16-6785-468a-bff9-baf8e13b38ec)
Oracle Data Guardカスタム構成の例:
Oracle Data Guardの構成には、JSONファイルを指定できます。JSONファイルで# odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby1: Password for root user on Standby site standby1: Standby 2 site address: standby2 BUI username for Standby site standby2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby2: Password for root user on Standby site standby2: Data Guard configuration name: dg6 Database name for Data Guard configuration: db Primary database SYS password: Protection mode [MAX_PROTECTION, MAX_PERFORMANCE, MAX_AVAILABILITY] (default: MAX_PERFORMANCE): MAX_AVAILABILITY Enable Active Data Guard? (Y/N, default:N): y ******************************************************************************************* Data Guard default settings for standby database kdb Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC Do you want to edit this Data Guard configuration? (Y/N, default:N): y ******************************************************************************************* Primary site network for Data Guard configuration [Public-network] (default: Public-network): Standby site network for Data Guard configuration [Public-network] (default: Public-network): Primary database listener port (TCP) (default: 1521): Standby database listener port (TCP) (default: 1521): Transport type [ASYNC, FASTSYNC, SYNC] (default: ASYNC): SYNC ******************************************************************************************* Data Guard default settings for standby database ldb Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC Do you want to edit this Data Guard configuration? (Y/N, default:N): y ******************************************************************************************* Primary site network for Data Guard configuration [Public-network] (default: Public-network): Standby site network for Data Guard configuration [Public-network] (default: Public-network): Primary database listener port (TCP) (default: 1521): Standby database listener port (TCP) (default: 1521): Transport type [ASYNC, FASTSYNC, SYNC] (default: ASYNC): SYNC Enter Primary database RMAN backup encryption password if any: Do you want to provide another Primary database RMAN backup encryption password if any? [y/n] (default 'n'): Standby database's SYS password will be set to Primary database's after Data Guard configuration. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): y { "jobId" : "fcf23de7-3ef0-4dae-9a3c-735abf9bda4a", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "December 13, 2024 01:58:53 AM CET", "resourceList" : [ ], "description" : "DG Config service for DB db", "updatedTime" : "December 13, 2024 01:58:53 AM CET", "jobType" : null, "cpsMetadata" : null } [root@test_host ~]# odacli describe-job -i fcf23de7-3ef0-4dae-9a3c-735abf9bda4a Job details ---------------------------------------------------------------- ID: fcf23de7-3ef0-4dae-9a3c-735abf9bda4a Description: DG Config service for DB db Status: Success Created: December 13, 2024 01:58:53 CET Message: Task Name Start Time End Time Status ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------- Validate configure primary request December 13, 2024 02:01:18 CET December 13, 2024 02:01:29 CET Success (Primary site) (Host: test_host/Job ID: cce1142e-24e4-4bbc-9d46-f46f96bf3191) Validate configure standby request December 13, 2024 02:01:29 CET December 13, 2024 02:01:45 CET Success (Standby site) (Host: standby1/Job ID: f962f6dc-4eeb-497f-9a0c-b9387d25318b) Uploading Primary DB Password File December 13, 2024 02:01:45 CET December 13, 2024 02:02:16 CET Success (Standby site) Configure primary database (Primary December 13, 2024 02:02:16 CET December 13, 2024 02:02:43 CET Success site) (Host: test_host/Job ID: 0d909875-ecec-450a-a2f9-6c09103d9f26) Configure standby request (Standby December 13, 2024 02:02:43 CET December 13, 2024 02:04:11 CET Success site) (Host: standby1/Job ID: 03ffc6b5-5f45-47af-b96c-d75b82a09234) Create archive log restore (Primary December 13, 2024 02:04:11 CET December 13, 2024 02:04:47 CET Success site) (Host: test_host/Job ID: 49808676-bd12-4933-8c28-eef7dee17503) Configure and enable Data Guard December 13, 2024 02:04:47 CET December 13, 2024 02:06:32 CET Success (Primary site) (Host: test_host/Job ID: 7ed03a2d-bb93-4ff7-9e45-0f825c8fff2f) Enable Flashback (Standby site) (Host: December 13, 2024 02:06:32 CET December 13, 2024 02:06:53 CET Success standby1/Job ID: da1ee6fb-cfb3-4f6d-9eaa-a6c1c8811d0e) Re-enable Data Guard (Primary site) December 13, 2024 02:06:53 CET December 13, 2024 02:06:59 CET Success (Host: test_host/Job ID: f1b8f204-da5b-40f4-886f-3dc2d0f71042) Enable Active Data Guard (Standby December 13, 2024 02:06:59 CET December 13, 2024 02:07:26 CET Success site) (Host: standby1/Job ID: d5982a61-b48d-4449-8cad-2eb41fc89ff9) Create Data Guard status (Primary December 13, 2024 02:07:26 CET December 13, 2024 02:07:42 CET Success site) (Host: test_host/Job ID: e7b6448b-301d-45e5-9a90-4388ac6f55f6) Create Data Guard status (Standby December 13, 2024 02:07:42 CET December 13, 2024 02:07:58 CET Success site) (Host: standby1/Job ID: b046c3ca-dcae-47c4-b904-8fe8fb7cd166) Validate configure primary request December 13, 2024 02:07:59 CET December 13, 2024 02:08:10 CET Success (Primary site) (Host: test_host/Job ID: f2cec30f-74ee-44e3-bbbc-f6bc47bcc781) Validate configure standby request December 13, 2024 02:08:10 CET December 13, 2024 02:08:26 CET Success (Standby site) (Host: standby2/Job ID: f170c64f-347b-4606-af31-dbb4c0abaccf) Uploading Primary DB Password File December 13, 2024 02:08:26 CET December 13, 2024 02:08:57 CET Success (Standby site) Configure primary database (Primary December 13, 2024 02:08:57 CET December 13, 2024 02:09:23 CET Success site) (Host: test_host/Job ID: f680835a-3813-433e-bcc3-8d49ae235833) Configure standby request (Standby December 13, 2024 02:09:23 CET December 13, 2024 02:11:02 CET Success site) (Host: standby2/Job ID: d66ef480-0810-4219-a5e1-633be0d6fe9a) Create archive log restore (Primary December 13, 2024 02:11:03 CET December 13, 2024 02:11:36 CET Success site) (Host: test_host/Job ID: ae4e5f3d-6792-44c4-8971-df41ae212a04) Configure standby TNS entry (New December 13, 2024 02:11:36 CET December 13, 2024 02:11:54 CET Success standby site) (Host: standby2/Job ID: 27bbe14a-6f7d-4a7f-bded-9d530327090f) Configure standby TNS entry (Existing December 13, 2024 02:11:54 CET December 13, 2024 02:12:13 CET Success standby site) (Host: standby1/Job ID: dcf53474-d649-452f-818a-4fe069e9761e) Add standby database (Primary site) December 13, 2024 02:12:13 CET December 13, 2024 02:13:38 CET Success (Host: test_host/Job ID: 2ffb36d8-74a0-4dc4-9f79-cc74223f1016) Enable Flashback (Standby site) (Host: December 13, 2024 02:13:38 CET December 13, 2024 02:14:00 CET Success standby2/Job ID: 01a23d42-d49a-4b61-9c28-19e9f7639800) Re-enable Data Guard (Primary site) December 13, 2024 02:14:00 CET December 13, 2024 02:14:06 CET Success (Host: test_host/Job ID: f416981a-99c1-4c0a-ab72-2bbb5a0e3a40) Enable Active Data Guard (Standby December 13, 2024 02:14:06 CET December 13, 2024 02:14:32 CET Success site) (Host: standby2/Job ID: 99618fc7-0500-4275-8ea2-f65a8b4e8f77) Update Data Guard status (Primary December 13, 2024 02:14:32 CET December 13, 2024 02:14:48 CET Success site) (Host: test_host/Job ID: 14b4526c-eebe-410a-920e-396df5216c93) Create Data Guard status (Standby December 13, 2024 02:14:48 CET December 13, 2024 02:15:15 CET Success site) (Host: standby2/Job ID: 090f829d-7f80-4481-800c-c9c6115a4be2) Update Data Guard status (Old Standby December 13, 2024 02:15:15 CET December 13, 2024 02:15:31 CET Success site) (Host: standby1/Job ID: afc0a2b3-18ad-461c-a13d-ec688427c6e6)
databaseName
およびstandbyEndpoints
オプションを指定します。{ "name": "tdb_DG", "protectionMode": "MAX_PERFORMANCE", "enableFlashback": true, "enableActiveDg": "false", "databaseName": "tdb", ==> newly added mandatory field "replicationGroups": [ { "sourceEndPoints": [ { "endpointType": "PRIMARY", "hostName": "host_name", "listenerPort": 1521, "databaseUniqueName": "tdb", "ipAddress": "xx.xx.xx.xx" ==> VIP of the corresponding network } ], "targetEndPoints": [ { "endpointType": "STANDBY", "hostName": "host_name", "listenerPort": 1521, "databaseUniqueName": "tdbstndby", "ipAddress": "xx.xx.xx.xx" } ], "transportType": "SYNC" } ], "standbyEndpoints": [ ==> newly added optional field { "name": "endpoint_test", "dcsUserName": "oda-admin" } ] }
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
JSONファイルを使用したOracle Database Appliance上の1つのスタンバイ・データベースでのOracle Data Guardの構成
# /opt/oracle/dcs/bin/odacli configure-dataguard --requestjson /mnt/host1/nfsbackup/dgcmd.json
Number of standby databases (enter 1 or 2 | default: 1):
BUI password for Standby site standby1:
Password for root user on Standby site standby1:
Primary database SYS password:
*******************************************************************************************
Standby database's SYS password will be set to Primary database's after Data Guard configuration. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): Y
{
"jobId" : "73adf616-3b6c-452f-bf93-e95abc675cc5",
"status" : "Created",
"message" : "",
"reports" : [ ],
"createTimestamp" : "January 23, 2025 05:08:50 AM UTC",
"resourceList" : [ ],
"description" : "DG Config service for DB tdb",
"updatedTime" : "January 23, 2025 05:08:50 AM UTC",
"jobType" : null,
"cpsMetadata" : null
}
[root@host1 work]# /opt/oracle/dcs/bin/odacli describe-job -i 73adf616-3b6c-452f-bf93-e95abc675cc5
Job details
----------------------------------------------------------------
ID: 73adf616-3b6c-452f-bf93-e95abc675cc5
Description: DG Config service for DB tdb
Status: Success
Created: January 23, 2025 05:08:50 UTC
Message:
Task Name Start Time End Time Status
---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------
Validate configure primary request January 23, 2025 05:09:19 UTC January 23, 2025 05:09:30 UTC Success
(Primary site) (Host: host1/Job
ID:
7bd1a3d5-2f8c-4d9e-a381-61d04f01b514)
Validate configure standby request January 23, 2025 05:09:30 UTC January 23, 2025 05:09:43 UTC Success
(Standby site) (Host:
host2/Job ID:
18731cf2-bf42-4a3a-b187-17e93cedbb7c)
Uploading Primary DB Password File January 23, 2025 05:09:43 UTC January 23, 2025 05:10:03 UTC Success
(Standby site)
Configure primary database (Primary January 23, 2025 05:10:03 UTC January 23, 2025 05:11:35 UTC Success
site) (Host: host1/Job ID:
d3030fe0-8885-42d6-a57f-ae38baef54af)
Configure standby request (Standby January 23, 2025 05:11:35 UTC January 23, 2025 05:13:35 UTC Success
site) (Host:
host2/Job ID:
763881f4-ea4d-43bc-8e6a-c7f78765c0ff)
Create archive log restore (Primary January 23, 2025 05:13:35 UTC January 23, 2025 05:13:54 UTC Success
site) (Host: host1/Job ID:
5dfbe653-10c8-420f-bada-4c0c8cb6a9e1)
Configure and enable Data Guard January 23, 2025 05:13:54 UTC January 23, 2025 05:15:26 UTC Success
(Primary site) (Host: host1/Job
ID:
137d29a2-9d2c-4ddc-85c8-3a729847e188)
Enable Flashback (Standby site) (Host: January 23, 2025 05:15:26 UTC January 23, 2025 05:15:44 UTC Success
host2/Job ID:
70306983-40a2-4039-98cb-57ba5e11e9a5)
Re-enable Data Guard (Primary site) January 23, 2025 05:15:44 UTC January 23, 2025 05:15:50 UTC Success
(Host: host1/Job ID:
4a5fb2aa-1b0b-45c8-b2f3-95103c9f1f00)
Create Data Guard status (Primary January 23, 2025 05:15:50 UTC January 23, 2025 05:15:56 UTC Success
site) (Host: host1/Job ID:
6848b9c1-356f-43ff-b6e0-5e9b1b01fc53)
Create Data Guard status (Standby January 23, 2025 05:15:56 UTC January 23, 2025 05:16:09 UTC Success
site) (Host:
host2/Job ID:
3109148f-9ef8-4914-ab43-adab4851e126)
Oracle Database Applianceの2つのスタンバイ・データベースでOracle Data Guardを構成するためのJSONの例
JSONファイルを使用して2つのスタンバイ・データベースを構成するには、2つのreplicationGroups
セクションを指定する必要があります。ここで、sourceEndpoints
はプライマリ・データベースに関する情報に対応し、各replicationGroups
セクションのtargetEndPoints
は各スタンバイ・データベースに対応しています。たとえば:
{
"name": "dgname",
"protectionMode": "MAX_PERFORMANCE",
"databaseName": "vmdb1",
"enableActiveDg": false,
"databaseName": "tdb", ==> newly added field
"standbyEndpoints": [ ==> newly added field
{
"name": "endpoint_test",
"dcsUserName": "oda-admin"
}
]
"replicationGroups": [
{
"sourceEndPoints": [
{
"databaseUniqueName": "vmdb1",
"ipAddress": "xx.xx.xx.xx",
"hostName": "host_name",
"listenerPort": 1521
}
],
"targetEndPoints": [
{
"databaseUniqueName": "bvmdb1",
"ipAddress": "xx.xx.xx.xx",
"hostName": "host_name,
"listenerPort": 1521
}
],
"transportType": "ASYNC"
},
{
"sourceEndPoints": [
{
"databaseUniqueName": "vmdb1",
"ipAddress": "xx.xx.xx.xx",
"hostName": "host_name",
"listenerPort": 1521
}
],
"targetEndPoints": [
{
"databaseUniqueName": "avmdb1",
"ipAddress": "xx.xx.xx.xx",
"hostName": "host_name",
"listenerPort": 1521
}
],
"transportType": "ASYNC"
}
]
}
BUIを使用したOracle Database ApplianceでのOracle Data Guardの構成
Oracle Database Applianceでは、BUIを使用してOracle Data Guardを設定できます。
Oracle Database Guardの構成の前提条件
- プライマリ・データベースとスタンバイ・データベースを別のOracle Database Applianceハードウェアで実行することをお薦めします。そのため、少なくとも2つの別々のOracle Database Applianceマシンがあることを確認してください。
- プライマリ・システムとスタンバイ・システムのOracle Database Appliance構成を同じにすることをお薦めします。データベース・スイッチ・ロールの予測できない事態を回避するために、データベースのデータベース・バージョンとストレージの構成が同じである必要があります(Oracle ASMまたはOracle ACFSストレージである必要がある)。
- プライマリ・システムとスタンバイ・システムのOracle Database Applianceリリースが同じで、Oracle Database Applianceリリース19.26以降である必要があります。
- オペレーティング・システムをカスタマイズした場合は、システムの環境が同じであることを確認します。
- デプロイメントがOracle Maximum Availability Architecture (MAA)のベスト・プラクティスに従っていることを確認します。Oracle Technology NetworkのOracle Maximum Availability Architecture (MAA)のページを参照してください。
- バックアップおよびリカバリにOracle ObjectStoreを使用する場合は、プライマリ・システムとスタンバイ・システムにアクセスを構成する必要があります。
- プライマリ・データベースとスタンバイ・データベースのバックアップが設定されていることを確認します。Oracle Database ApplianceでOracle Data Guardを構成するときに、オブジェクト・ストアまたは外部FRA (NFS)を使用して、プライマリ・データベースとスタンバイ・データベースのバックアップを設定できます。スタンバイ・データベースをインスタンス化するには、バックアップが必要です。
BUIを使用したOracle Data Guardの構成
- ブラウザ・ユーザー・インタフェースにログインします。
https://host-ip-address:7093/mgmt/index.html
- 「Database」をクリックします。
- 「Database」ページで、データベースをクリックしてデータベース詳細を表示します。
- データベースの詳細ページで、「Dataguard Associations」タブをクリックします。データベースに関連付けられているOracle Data Guard構成が表示されます。
- Oracle Data Guard構成を構成するには、「Configure」をクリックします。
- 「System Information」タブでは、JSONファイルを使用してOracle Data Guard構成値を指定したり、各フィールドの値を指定できます。
- JSONファイルを使用してOracle Data Guardを構成するには、「System Information」タブで「Browse」をクリックし、構成をロードします。
- または、「Dataguard Configuration Name」および「Select Protection Mode」を指定します。「Database name」フィールドはすでに移入されています。
- Oracle Active Data Guardを有効にする場合は、「Enable Active Dataguard」を選択します。
- 「Primary Information」タブで、「VIP of the Associated Network」、「Listener Port」、「Database SYS Password」および「Backup Encryption Passwords」を指定します。高可用性システムの場合、「Node 0 VIP of the Associated Network」、「Node 1 Primary Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 「Standby Information」タブで、「Standby Host Name」、「VIP of the Associated Network」、「BUI User」、「BUI Password」、「System User」、「Database Unique Name」、「Database SYS Password」、「Listener Port」および「Select Transport Type」を指定します。高可用性システムの場合、「Node 0 Standby Host Name」、「Node 0 VIP of the Associated Network」、「Node 1 Standby Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 複数のスタンバイOracle Data Guard構成を追加できます。「Add Standby」をクリックして、新しいスタンバイOracle Data Guard構成を追加します。追加する新しいスタンバイごとに、新しい「Standby Information」タブが開きます。
- 新しいスタンバイごとに、「Standby Host Name」、「VIP of the Associated Network」、「BUI User」、「BUI Password」、「System User」、「Database Unique Name」、「Database SYS Password」、「Listener Port」および「Select Transport Type」を指定します。高可用性システムの場合、「Node 0 Standby Host Name」、「Node 0 VIP of the Associated Network」、「Node 1 Standby Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 構成をJSONファイルとして保存する場合は、「Save Configuration」をクリックします。
- 「Configure」をクリックし、「Yes」をクリックして確定します。ジョブが発行され、正常に完了していることを確認します。
Oracle Database ApplianceでOracle Data Guardを構成するためのJSONの例
{
"name": "test1_test7",
"databaseName": "test",
"protectionMode": "MAX_PERFORMANCE",
"enableFlashback": true,
"enableActiveDg": false,
"replicationGroups": [
{
"sourceEndPoints": [
{
"endpointType": "PRIMARY",
"hostName": test_domain1",
"listenerPort": 1521,
"databaseUniqueName": "test1",
"ipAddress": "test_IPaddress"
},
{
"endpointType": "PRIMARY",
"hostName": "test_domain1",
"listenerPort": 1521,
"databaseUniqueName": "test1",
"ipAddress": "test_IPaddress2"
}
],
"targetEndPoints": [
{
"endpointType": "STANDBY",
"hostName": "test_domain2",
"listenerPort": 1521,
"databaseUniqueName": "test7",
"ipAddress": "test_IPaddress3"
},
{
"endpointType": "STANDBY",
"hostName": "test_domain2",
"listenerPort": 1521,
"databaseUniqueName": "test7",
"ipAddress": "test_IPaddress4"
}
],
"transportType": "ASYNC"
}
]
}
Oracle Database ApplianceでのOracle Data Guardのステータスの表示
ODACLIコマンドを使用してOracle Data Guardのステータスを表示します。
ODACLIコマンドを使用したOracle Data Guardのステータスの表示
- Oracle Data Guard構成のプライマリ・データベースとスタンバイ・データベースのステータスを表示するには、次のコマンドを使用します。
# odacli list-dataguardstatus
- 特定のOracle Data Guard構成のステータスを表示するには、次のコマンドを使用します。
# odacli describe-dataguardstatus -i 5f0ed48a-366d-454c-a389-fe367772dbb7
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
BUIを使用したOracle Database ApplianceでのOracle Data Guardのステータスの表示
BUIを使用してOracle Data Guardのステータスを表示します。
BUIを使用したOracle Data Guardステータスのリストおよび表示
- ブラウザ・ユーザー・インタフェースにログインします。
https://host-ip-address:7093/mgmt/index.html
- 「Database」をクリックします。
- 「Database」ページで、データベースをクリックしてデータベース詳細を表示します。
- データベースの詳細ページで、「Dataguard Associations」タブをクリックします。
データベースに関連付けられているOracle Data Guard構成が表示されます。
- 特定のOracle Data Guard構成のステータスを表示するには、Oracle Data Guard構成の「Actions」ドロップダウン・リストから「View」を選択します。
Oracle Data Guardの操作の実行
ODACLIコマンドを使用して、Oracle Data Guardでフェイルオーバー、スイッチオーバーおよび回復操作を実行します。
ODACLIコマンドを使用したOracle Data Guardの操作の実行
- Oracle Data Guard構成のプライマリ・データベースとスタンバイ・データベースの間でロールを切り替えるには、プライマリ・システムに対して次のコマンドを実行します。
-u
オプションを使用して、スタンバイ・データベースの一意の名前を指定します。# odacli switchover-dataguard -i dg_ID -u standby_db_unique_name_to_switchover
たとえば:
# odacli switchover-dataguard -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19 -u test_db2
ロールのスイッチオーバーが正常に完了したことを確認します。
# odacli describe-dataguardstatus -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19
- Oracle RACプライマリ・データベースのすべてのインスタンスに障害が発生した場合やアクセスできない場合は、フェイルオーバーによって、構成内のスタンバイ・データベースを移行してプライマリ・データベース・ロールを引き継ぎます。
Oracle Data Guard構成のプライマリ・データベースにスタンバイ・データベースをフェイルオーバーするには、現在のスタンバイ・システムに対して次のコマンドを実行します。
# odacli failover-dataguard -i dg_ID -u standby_db_unique_name_to_failover_to
たとえば:
# odacli failover-dataguard -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19 -u test_db2
要求された新しいプライマリ・データベースへのデータベース・フェイルオーバーが正常に完了したことを確認します。
# odacli describe-dataguardstatus -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19
-
フェイルオーバー後に障害が発生したプライマリ・データベースを回復して、Oracle Data Guard構成の新しいスタンバイ・データベースに変換するには、新しいプライマリ・システムに対して次のコマンドを実行します。
# odacli reinstate-dataguard -i dg_ID -u db_unique_name_to_reinstate
たとえば:
# odacli reinstate-dataguard -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19 -u test_db2
要求されたデータベースが新しいスタンバイ・データベースとして回復していることを確認します。
# odacli describe-dataguardstatus -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
BUIを使用したOracle Data Guardの操作の実行
BUIを使用して、Oracle Data Guardでフェイルオーバー、スイッチオーバーおよび回復操作を実行します。
BUIを使用したOracle Data Guardのスイッチオーバー、フェイルオーバーおよび回復操作の実行
- ブラウザ・ユーザー・インタフェースにログインします。
https://host-ip-address:7093/mgmt/index.html
- 「Database」をクリックします。
- 「Database」ページで、データベースをクリックしてデータベース詳細を表示します。
- データベースの詳細ページで、「Dataguard Associations」タブをクリックします。データベースに関連付けられているOracle Data Guard構成が表示されます。
- スイッチオーバー操作は、BUIを使用してプライマリOracle Data Guardアソシエーションからのみ実行できます。Oracle Data Guard構成の「Actions」ドロップダウン・リストから「Switchover」を選択します。
- 確認メッセージで、「DB Unique Name」および「Target Database Password」を確認し、「Yes」をクリックします。
- フェイルオーバー操作は、BUIを使用してスタンバイOracle Data Guardアソシエーションからのみ実行できます。Oracle Data Guard構成の「Actions」ドロップダウン・リストから「Failover」を選択します。
- 確認メッセージで、「DB Unique Name」および「Target Database Password」を確認し、「Yes」をクリックします。
- 回復操作は、BUIを使用してプライマリOracle Data Guardアソシエーションからのみ実行できます。Oracle Data Guard構成を回復するには、Oracle Data Guard構成の「Actions」ドロップダウン・リストから「Reinstate」を選択します。
- 確認メッセージで、「DB Unique Name」および「Target Database Password」を確認し、「Yes」をクリックします。
Oracle Data Guardネットワークの作成
Oracle Data Guardネットワークを作成し、ODACLIコマンドを使用してデータベースに関連付けます。
ODACLIコマンドを使用したOracle Data Guardネットワークの構成
Oracle Data Guardは、パブリック、データベースまたはDataguardタイプのネットワークを使用して構成できます。
- ネットワークを作成します。
# odacli create-network -n btbond1 -t VLAN -p 192.209.10.227 -w Dataguard -no-d -s 255.255.255.240 -v 369 -g 192.209.10.225
- 新しいネットワークを表示します。
# odacli list-networks ID Name NIC Interface Type Subnet Mask Gateway VLAN ID Node Networks -------------------------------------- -------------------- ------------ --------------- ------------------ ------------------ -------- ----------------------- 836cfa4b-5d2c-45e3-a62d-099fc7c57984 Private-network priv0 INTERNAL 255.255.255.240 [ IP Address on node0: 192.168.16.24 ] 1a312239-761d-4321-84d2-8da406f21e5c Public-network btbond1.359 VLAN 255.255.255.240 10.209.10.65 359 [ IP Address on node0: 192.209.10.69 ] f279ac96-5a4a-4b73-86af-1afbdb6ae5d4 vlan369 btbond1.369 VLAN 255.255.255.240 10.209.10.225 369 [ IP Address on node0: 192.209.10.227]
- データベースにDataguardタイプのネットワークを関連付けるには:
# odacli modify-database -in test_db -an vlan369
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
統合されたOracle Data Guardを使用したあるシステムから別のシステムへのOracle Databaseの移行
統合されたOracle Data Guardを使用して、あるシステムから別のシステムにOracle Databaseを移行する方法を説明します。
ODACLIコマンドを使用したOracle Data Guardデータベースの移行
データベースが古いOracle Database Applianceハードウェア・モデルにあり、デプロイメントを新しいOracle Database Applianceハードウェアに移動する場合は、Oracle Database Appliance上のOracle Data Guard構成を使用して、システム間を移行できます。同じステップを適用して、Oracle DatabaseをOracle Database Applianceベア・メタル・システムからKVMデプロイメント内のDBシステムに移行したり、KVMデプロイメント内の1つのDBシステムから別のDBシステムに移行することもできます。
- プライマリ・データベースとスタンバイ・データベースを別のOracle Database Applianceハードウェアで実行することをお薦めします。そのため、少なくとも2つの別々のOracle Database Applianceマシンがあることを確認してください。
- プライマリ・システムとスタンバイ・システムのOracle Database Applianceリリースが同じで、Oracle Database Applianceリリース19.8以上である必要があります。プライマリ・データベースとスタンバイ・データベースのインスタンスは、データベース・バージョン、メモリー、CPU、ネットワークおよびストレージ(Oracle ASMまたはOracle ACFS)などのデータベース・パラメータ設定の構成が同じである必要があり、これにより、データベースがロールを切り替える際に予測できない事態を回避できます。
- オペレーティング・システムをカスタマイズした場合は、両方のマシンの環境が同じであることを確認します。
- デプロイメントがOracle Maximum Availability Architecture (MAA)のベスト・プラクティスに従っていることを確認します。
次のステップに従います。
- プライマリ・データベースのバックアップをオブジェクト・ストアまたは外部FRA (NFS)に作成します。
# odacli create-backup primary_DB
たとえば:# odacli create-backup --backupType Regular-L0 -in test_db
- バックアップ・レポートを保存します。
# odacli describe-backupreport -i eba406c7-ae46-4d1d-a1e5-3e985397b171 > backup_report_test_db_0620.json
バックアップ・レポートIDは、ステップ1で作成したバックアップのIDであり、
odacli list-backupreports
コマンドを実行して取得できます。 - バックアップ・レポートをスタンバイ・システムにコピーし、バックアップをスタンバイ・データベースにリストアします。
# odacli irestore-database -ro STANDBY
バックアップ・オプションがオブジェクト・ストアの場合は、オブジェクト・ストアの場所を指定します。
# odacli irestore-database -r backup_report.json -u dbUniqueName -on objectStoreName -bp -ro STANDBY -dh Password for SYS user: Rman Backup Encryption Password(s). Multiple passwords needs to be comma separated.:
バックアップ・オプションがNFSの場合は、NFSの場所を指定します。
odacli irestore-database -r backup_report.json -u dbUniqueName -ro STANDBY Password for SYS user:
- プライマリ・システムに対して次のコマンドを実行して、Oracle Data Guardを構成します。
# /opt/oracle/dcs/bin/odacli configure-dataguard Number of standby databases (enter 1 or 2 | default: 1): Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): oda-admin BUI password for Standby site standby1: Password for root user on Standby site standby1: ******************************************************************************************* Data Guard configuration name: tdb_dg Database name for Data Guard configuration: tdb Primary database SYS password: Protection mode [MAX_PROTECTION, MAX_PERFORMANCE, MAX_AVAILABILITY] (default: MAX_PERFORMANCE): Enable Active Data Guard (Y/N, default:N): ******************************************************************************************* Data Guard default settings for standby database - tdbstndby Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC Do you want to edit this Data Guard configuration? (Y/N, default:N): N ******************************************************************************************* Enter Primary database RMAN backup encryption password if any: Do you want to provide another Primary database RMAN backup encryption password if any? [y/n] (default 'n'): Standby database's SYS password will be set to Primary database's after Data Guard configuration. Ignore warning and proceed with Data Guard configuration? (Y/N, default:N): Y { "jobId" : "e02cc0b3-bce3-4d6c-a1f5-5b121bb7f66a", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "January 23, 2025 03:12:44 AM UTC", "resourceList" : [ ], "description" : "DG Config service for DB tdb", "updatedTime" : "January 23, 2025 03:12:44 AM UTC", "jobType" : null, "cpsMetadata" : null } [root@phxdbfzp22 work]# /opt/oracle/dcs/bin/odacli describe-job -i e02cc0b3-bce3-4d6c-a1f5-5b121bb7f66a Job details ---------------------------------------------------------------- ID: e02cc0b3-bce3-4d6c-a1f5-5b121bb7f66a Description: DG Config service for DB tdb Status: Success Created: January 23, 2025 03:12:44 UTC Message: Task Name Start Time End Time Status ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------- Validate configure primary request January 23, 2025 03:13:10 UTC January 23, 2025 03:13:21 UTC Success (Primary site) (Host: phxdbfzp22/Job ID: 901389f5-0cad-4ee6-91be-3f77b85652af) Validate configure standby request January 23, 2025 03:13:21 UTC January 23, 2025 03:13:29 UTC Success (Standby site) (Host: host1/Job ID: 856d86e4-dd51-41a7-9050-b0c39ae771f9) Uploading Primary DB Password File January 23, 2025 03:13:29 UTC January 23, 2025 03:13:52 UTC Success (Standby site) Configure primary database (Primary January 23, 2025 03:13:52 UTC January 23, 2025 03:15:29 UTC Success site) (Host: phxdbfzp22/Job ID: 5dd46e86-e07f-423f-9ebf-2515b4ac17d5) Configure standby request (Standby January 23, 2025 03:15:29 UTC January 23, 2025 03:17:30 UTC Success site) (Host: host1/Job ID: 2ab511a2-15c0-4371-bf30-9b7e27ff5288) Create archive log restore (Primary January 23, 2025 03:17:30 UTC January 23, 2025 03:17:52 UTC Success site) (Host: phxdbfzp22/Job ID: 96766874-6537-4972-81a9-971440e2acfb) Configure and enable Data Guard January 23, 2025 03:17:53 UTC January 23, 2025 03:19:19 UTC Success (Primary site) (Host: phxdbfzp22/Job ID: 7ad65ffa-ea06-479d-bb21-e0b81fb8c743) Enable Flashback (Standby site) (Host: January 23, 2025 03:19:19 UTC January 23, 2025 03:19:38 UTC Success host1/Job ID: a1768703-4dd4-4f1f-b9a3-9fe0f99615d5) Re-enable Data Guard (Primary site) January 23, 2025 03:19:38 UTC January 23, 2025 03:19:44 UTC Success (Host: phxdbfzp22/Job ID: 3f6dd276-63e3-4804-a179-e10052386206) Create Data Guard status (Primary January 23, 2025 03:19:44 UTC January 23, 2025 03:19:49 UTC Success site) (Host: phxdbfzp22/Job ID: 8a3eb946-3501-4618-9d4a-ad8a6d298cc8) Create Data Guard status (Standby January 23, 2025 03:19:49 UTC January 23, 2025 03:19:57 UTC Success site) (Host: host1/Job ID: d9d65942-6284-40d5-a991-b1d21edae96f)
- Oracle Data Guardのステータスを確認し、動作していることを確認します。
# odacli describe-dataguardstatus -i dataguard_configuration_ID
- スタンバイ・データベースへのスイッチオーバーを行います。
# odacli switchover-dataguard -i 75f23ce0-006a-4aeb-ba6d-b4b60275c19 -u houdg02
- Oracle Data Guardの構成を解除します。このプロセスでは、古いOracle Database Applianceハードウェア・マシン上のスタンバイ・データベースも削除されます。
# /opt/oracle/dcs/bin/odacli deconfigure-dataguard --id "ee22f382-b04e-4658-a6c7-ab00fc7e3270" Number of standby databases (enter 1 or 2 | default: 1): Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): oda-admin BUI password for Standby site standby1: Password for root user on Standby site standby1: Standby database will be deleted after Data Guard configuration is removed. Ignore warning and proceed with Data Guard deconfiguration? (Y/N): Y { "jobId" : "0613c649-3da6-463a-8359-2f6d7d17399b", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "January 23, 2025 03:42:41 AM UTC", "resourceList" : [ ], "description" : "DG Deconfig service", "updatedTime" : "January 23, 2025 03:42:41 AM UTC", "jobType" : null, "cpsMetadata" : null } [root@phxdbfzp22 work]# /opt/oracle/dcs/bin/odacli describe-job -i 0613c649-3da6-463a-8359-2f6d7d17399b Job details ---------------------------------------------------------------- ID: 0613c649-3da6-463a-8359-2f6d7d17399b Description: DG Deconfig service Status: Success Created: January 23, 2025 03:42:41 UTC Message: Task Name Start Time End Time Status ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------- De-configure Dataguard (Primary site) January 23, 2025 03:42:44 UTC January 23, 2025 03:44:22 UTC Success (Host: phxdbfzp22/Job ID: 93758e42-2cf4-4aa1-949e-b6018c1c35d7) Delete Dataguard Status(Primary site) January 23, 2025 03:44:22 UTC January 23, 2025 03:44:28 UTC Success (Host: phxdbfzp22/Job ID: e090af71-9c6d-4d14-8e16-3c64c4aa7f14) Delete Dataguard Status(Standby site) January 23, 2025 03:44:28 UTC January 23, 2025 03:44:36 UTC Success (Host: host1/Job ID: a5bf022a-c1ca-4c1a-8747-4ff6a0e938c0) Delete Standby Database (Standby site) January 23, 2025 03:44:36 UTC January 23, 2025 03:46:07 UTC Success (Host: host1/Job ID: f93b1f26-69d9-4690-84f9-4c0c9947423a)
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
Oracle Database ApplianceでのOracle Data Guardデータベースへのパッチ適用
ODACLIコマンドを使用して、Oracle Data Guardのプライマリ・データベースとスタンバイ・データベースにパッチを適用する方法を説明します。
ODACLIコマンドを使用してOracle Data Guardのプライマリ・データベースとスタンバイ・データベースにパッチを適用するための前提条件
重要:
プライマリ・データベースにパッチを適用する前に、まずOracle Database Applianceのスタンバイ・データベースにパッチを適用して、すべての機能が正しく更新されていることを確認します。最初にスタンバイにパッチを適用すると、Oracle Active Data Guard OJVMの機能に影響する可能性があります。そのため、まずスタンバイ・システムにパッチを適用し、その後すぐにプライマリ・システムにパッチを適用してください。
odacli update-database
コマンドを使用したOracle Data Guardのプライマリ・データベースとスタンバイ・データベースへのパッチ適用
odacli update-database
コマンドを使用して、Oracle Data Guard構成のデータベースを更新できます。Oracle Data Guard構成のデータベースにパッチを適用するには、次のステップに従います。
- データベースBのパッチ前レポートを作成します。
# odacli create-prepatchreport -db -dbid databaseId -to dbhomeid
- スタンバイ・データベースBを更新します。
# odacli update-database -i databaseId -to dbhomeId
- プライマリ・システムで次のコマンドを実行して、Oracle Data Guard構成のプライマリ・データベースとスタンバイ・データベースの間でロールを切り替えます。
# odacli switchover-dataguard -i dgid -u db_A
- データベースAのパッチ前レポートを作成します。
# odacli create-prepatchreport -db -dbid databaseId -to dbhomeid
- データベースAを更新します。
# odacli update-database -i databaseId -to dbhomeid
- プライマリ・システムで次のコマンドを実行して、Oracle Data Guard構成のプライマリ・データベースとスタンバイ・データベースの間で再度ロールを切り替えます。
# odacli switchover-dataguard -i dgid -u db_A
- データベースAのデータパッチについてパッチ前レポートを作成します:
# odacli create-prepatchreport -dp -dbid databaseId
- データベースAにデータパッチを適用します。
# odacli update-database -i databaseId -dp
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
odacli update-dbhome
コマンドを使用したOracle Data Guardのプライマリ・データベースとスタンバイ・データベースへのパッチ適用
- スタンバイデータベースに対して次のコマンドを実行します。
# odacli update-dbhome
- スタンバイ・データベースでのパッチ適用ジョブが成功したら、プライマリ・データベースに対して次のコマンドを実行します。
# odacli update-dbhome
- パッチ適用ジョブが成功したことを確認します。
# /opt/oracle/dcs/bin/odacli list-jobs
- プライマリ・システムとスタンバイ・システムの両方に対して次のコマンドを実行して、既存のData Guard構成が正しく動作していることを確認します。
odacli describe-dataguardstatus -i dgid
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
既存の構成でのOracle Active Data Guardの有効化
既存の構成でOracle Active Data Guardを有効にする方法を説明します。
Oracle Active Data Guardは、Oracle Database Enterprise Editionのライセンス・オプションであり、基本的なOracle Data Guard機能を拡張した高度な機能を提供します。
- データベースを変更して、読取り専用起動オプションを指定します。
srvctl modify database -d standby_db_unique_name -startoption "read only" srvctl stop database -d standby_db_unique_name srvctl start database -d standby_db_unique_name
Oracle Data Guardに読取り専用起動オプションが設定されているかどうかを確認するには、次のコマンドを実行します。
srvctl config database -d standby_db_unique_name | grep "Start options"
- 次のPL/SQLコマンドを実行して、REDOログの適用を有効にします。
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
ODACLIコマンドを使用したOracle Database ApplianceでのOracle Data Guardの登録
Oracle Database Applianceでは、手動で構成されたOracle Data Guard構成を移行し、ODACLIコマンドを使用して構成メタデータをOracle Database Applianceに登録できます。
Oracle Database Guardの登録の前提条件
- プライマリ・データベースとスタンバイ・データベースを別のOracle Database Applianceハードウェアで実行することをお薦めします。そのため、少なくとも2つの別々のOracle Database Applianceマシンがあることを確認してください。
- プライマリ・システムとスタンバイ・システムのOracle Database Appliance構成を同じにすることをお薦めします。データベース・スイッチ・ロールの予測できない事態を回避するために、データベースのデータベース・バージョンとストレージの構成が同じである必要があります(Oracle ASMまたはOracle ACFSストレージである必要がある)。
- プライマリ・システムとスタンバイ・システムのOracle Database Applianceリリースが同じで、Oracle Database Applianceリリース19.22以降である必要があります。
- オペレーティング・システムをカスタマイズした場合は、システムの環境が同じであることを確認します。
- デプロイメントがOracle Maximum Availability Architecture (MAA)のベスト・プラクティスに従っていることを確認します。Oracle Technology NetworkのOracle Maximum Availability Architecture (MAA)のページを参照してください。
ODACLIコマンドを使用したOracle Data Guardの登録
次のステップに従います。
- 次のいずれかの方法で、Oracle Data GuardをOracle Database Applianceに登録します。
対話モードを使用してOracle Data Guardを登録します。
[root@node1 ~]# odacli register-dataguard Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: host2 BUI username for Standby site host2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site host2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site host2: Password for root user on Standby site host2: Standby 2 site address: host3 BUI username for Standby site host3. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site host1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site host3: Password for root user on Standby site host3: ******************************************************************************************* Data Guard configuration name: books_dgconf Database name for Data Guard configuration: books Primary database SYS password: Protection mode [MAX_PROTECTION, MAX_PERFORMANCE, MAX_AVAILABILITY] (default: MAX_PERFORMANCE): ******************************************************************************************* Data Guard default settings for standby database - books_u1 Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC For standby 'books_u1', does the above Data Guard configuration match your actual configuration? (Y/N, default:N): y Data Guard default settings for standby database - books_u2 Primary site network for Data Guard configuration: Public-network Standby site network for Data Guard configuration: Public-network Primary database listener port (TCP): 1521 Standby database listener port (TCP): 1521 Transport type: ASYNC For standby 'books_u2', does the above Data Guard configuration match your actual configuration? (Y/N, default:N): y { "jobId" : "525d4c0d-5d4c-401b-9d7a-add15e1057a5", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "December 15, 2024 03:22:40 AM MSK", "resourceList" : [ ], "description" : "Register Dataguard service for DB a9cca840-d5f6-4c52-8136-10668ce88c69", "updatedTime" : "December 15, 2024 03:22:40 AM MSK", "jobType" : null, "cpsMetadata" : null } [root@host1 ~]# odacli describe-job -i 525d4c0d-5d4c-401b-9d7a-add15e1057a5 Job details ---------------------------------------------------------------- ID: 525d4c0d-5d4c-401b-9d7a-add15e1057a5 Description: Register Dataguard service for DB a9cca840-d5f6-4c52-8136-10668ce88c69 Status: Success Created: December 15, 2024 03:22:40 MSK Message: Task Name Node Name Start Time End Time Status ---------------------------------------- ------------------------- ---------------------------------------- ---------------------------------------- ---------------- Validate register dataguard primary host1 December 15, 2024 03:23:45 MSK December 15, 2024 03:24:20 MSK Success request (Primary site) (Host: host1/Job ID: e11da95d-e00e-41b3-9894-8dd7a9ffceb9) Validate register dataguard standby host1 December 15, 2024 03:24:20 MSK December 15, 2024 03:25:05 MSK Success request (Standby site) (Host: host2/Job ID: 6e566598-700c-4154-8056-853df67d15b3) Validate register dataguard standby host1 December 15, 2024 03:25:05 MSK December 15, 2024 03:25:45 MSK Success request (Standby site) (Host: host1/Job ID: 11330cdd-ccdf-4e05-acf8-2885418a9efc) Create Data Guard status (Primary host1 December 15, 2024 03:25:45 MSK December 15, 2024 03:26:07 MSK Success site) (Host: host1/Job ID: a779a3d6-709a-4a1c-a649-9fbf373624ed) Create Data Guard status (Standby host1 December 15, 2024 03:26:07 MSK December 15, 2024 03:26:34 MSK Success site) (Host: host2/Job ID: 9233aea0-021a-4790-b359-60de42d50526) Create Data Guard status (Standby host1 December 15, 2024 03:26:34 MSK December 15, 2024 03:27:01 MSK Success site) (Host: host1/Job ID: 79f7ec79-fb43-4f57-8f05-da37afbe275b)
プライマリ・システムのOracle Data Guardステータス:
# odacli list-dataguardstatus Updated about 2 minute(s) ago It can take up to several minutes to update Data Guard status. You can re-run the command to obtain the latest status. ID Name Database Name Role Protection Mode Status ---------------------------------------- -------------------------------- -------------------- ---------- ------------------ ---------- a3543f5a-63a8-42c3-abcc-a8e180a1dd25 books_dgconf books PRIMARY MAX_PERFORMANCE CONFIGURED [root@host1_node1 ~]# odacli list-dataguardstatus -j [ { "id" : "a3543f5a-63a8-42c3-abcc-a8e180a1dd25", "name" : "books_dgconf", "databaseId" : "a9cca840-d5f6-4c52-8136-10668ce88c69", "protectionMode" : "MAX_PERFORMANCE", "role" : "PRIMARY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "n1", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xxx.xxx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "n2", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "12.00 KByte/s" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "n1", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.x.xx.xxx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "host1", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "host1", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "5.00 KByte/s" } ], "observers" : [ ], "createTime" : "December 15, 2024 03:25:48 AM MSK", "state" : { "status" : "CONFIGURED" }, "updatedTime" : "December 15, 2024 03:26:06 AM MSK" } ] [root@host1_node2 ~]# odacli list-dataguardstatus -j [ { "id" : "a3543f5a-63a8-42c3-abcc-a8e180a1dd25", "name" : "books_dgconf", "databaseId" : "a9cca840-d5f6-4c52-8136-10668ce88c69", "protectionMode" : "MAX_PERFORMANCE", "role" : "PRIMARY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "n1", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "n2", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "12.00 KByte/s" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "n1", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "test_service", "sysPassword" : null, "openMode" : "READ WRITE", "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "x.xx.xxx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "host1", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "host1", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "5.00 KByte/s" } ], "observers" : [ ], "createTime" : "December 15, 2024 03:25:48 AM MSK", "state" : { "status" : "CONFIGURED" }, "updatedTime" : "December 15, 2024 03:26:06 AM MSK" } ]
最初のスタンバイ・システムのOracle Data Guardステータス:
# odacli list-dataguardstatus Updated about 3 minute(s) ago It can take up to several minutes to update Data Guard status. You can re-run the command to obtain the latest status. ID Name Database Name Role Protection Mode Status ---------------------------------------- -------------------------------- -------------------- ---------- ------------------ ---------- a3543f5a-63a8-42c3-abcc-a8e180a1dd25 books_dgconf books STANDBY MAX_PERFORMANCE CONFIGURED [root@host2_node1 ~]# odacli list-dataguardstatus -j [ { "id" : "a3543f5a-63a8-42c3-abcc-a8e180a1dd25", "name" : "books_dgconf", "databaseId" : "d2ccb22b-3e31-47cb-967c-1f1fdefea54e", "protectionMode" : "MAX_PERFORMANCE", "role" : "STANDBY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "11.00 KByte/s" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "5.00 KByte/s" } ], "observers" : [ ], "createTime" : "December 15, 2024 00:26:21 AM GMT", "state" : { "status" : "CONFIGURED" }, "updatedTime" : "December 15, 2024 00:26:31 AM GMT" } ] [root@host2_node2 bin]# odacli list-dataguardstatus Updated about 5 minute(s) ago It can take up to several minutes to update Data Guard status. You can re-run the command to obtain the latest status. ID Name Database Name Role Protection Mode Status ---------------------------------------- -------------------------------- -------------------- ---------- ------------------ ---------- a3543f5a-63a8-42c3-abcc-a8e180a1dd25 books_dgconf books STANDBY MAX_PERFORMANCE CONFIGURED [root@scaoda603c4n2 bin]# odacli list-dataguardstatus -j [ { "id" : "a3543f5a-63a8-42c3-abcc-a8e180a1dd25", "name" : "books_dgconf", "databaseId" : "d2ccb22b-3e31-47cb-967c-1f1fdefea54e", "protectionMode" : "MAX_PERFORMANCE", "role" : "STANDBY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "10.32.202.58", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "11.00 KByte/s" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "10.32.202.9", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "5.00 KByte/s" } ], "observers" : [ ], "createTime" : "December 15, 2024 00:26:21 AM GMT", "state" : { "status" : "CONFIGURED" }, "updatedTime" : "December 15, 2024 00:26:31 AM GMT" } ]
2番目のスタンバイ・システムのOracle Data Guardステータス:
# odacli list-dataguardstatus Updated about 3 minute(s) ago It can take up to several minutes to update Data Guard status. You can re-run the command to obtain the latest status. ID Name Database Name Role Protection Mode Status ---------------------------------------- -------------------------------- -------------------- ---------- ------------------ ---------- a3543f5a-63a8-42c3-abcc-a8e180a1dd25 books_dgconf books STANDBY MAX_PERFORMANCE CONFIGURED [root@scaoda603c4n1 ~]# odacli list-dataguardstatus -j [ { "id" : "a3543f5a-63a8-42c3-abcc-a8e180a1dd25", "name" : "books_dgconf", "databaseId" : "d2ccb22b-3e31-47cb-967c-1f1fdefea54e", "protectionMode" : "MAX_PERFORMANCE", "role" : "STANDBY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "11.00 KByte/s" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "5.00 KByte/s" } ], "observers" : [ ], "createTime" : "December 15, 2024 00:26:21 AM GMT", "state" : { "status" : "CONFIGURED" }, "updatedTime" : "December 15, 2024 00:26:31 AM GMT" } ] [root@host3_node2 bin]# odacli list-dataguardstatus Updated about 5 minute(s) ago It can take up to several minutes to update Data Guard status. You can re-run the command to obtain the latest status. ID Name Database Name Role Protection Mode Status ---------------------------------------- -------------------------------- -------------------- ---------- ------------------ ---------- a3543f5a-63a8-42c3-abcc-a8e180a1dd25 books_dgconf books STANDBY MAX_PERFORMANCE CONFIGURED [root@scaoda603c4n2 bin]# odacli list-dataguardstatus -j [ { "id" : "a3543f5a-63a8-42c3-abcc-a8e180a1dd25", "name" : "books_dgconf", "databaseId" : "d2ccb22b-3e31-47cb-967c-1f1fdefea54e", "protectionMode" : "MAX_PERFORMANCE", "role" : "STANDBY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u1", "ipAddress" : "10.32.202.58", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : "MOUNTED", "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "11.00 KByte/s" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "PRIMARY", "databaseUniqueName" : "books", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "10.32.202.9", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } }, { "endpointType" : "STANDBY", "databaseUniqueName" : "books_u2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host_name", "listenerPort" : 1521, "serviceName" : "service_name", "sysPassword" : null, "openMode" : null, "state" : { "status" : "ENABLED" } } ], "transportType" : "ASYNC", "applyLag" : "0 seconds", "transportLag" : "0 seconds", "approximateRoleTransitionTime" : "30 seconds", "applyRate" : "5.00 KByte/s" } ], "observers" : [ ], "createTime" : "December 15, 2024 00:26:21 AM GMT", "state" : { "status" : "CONFIGURED" }, "updatedTime" : "December 15, 2024 00:26:31 AM GMT" } ]
JSONファイルを使用してOracle Data Guardを2つのスタンバイ・システムに登録します:
[root@node1 ~]# odacli register-dataguard -r advregdg.json Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: host2 BUI username for Standby site host2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site host2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): u1 BUI password for Standby site host2. If Multi-user Access Passwordless is enabled on Standby site, copy the cwallet.sso file from Standby site (/opt/oracle/dcs/conf/dcspublickey_wallet/) to Primary site (/root/). Rename the file to 'cwallet.sso.host2', set the file ownership (root:root) and file permission (0440) and then press enter: Standby 2 site address: host3 BUI username for Standby site host3. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site host3, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): usr1 BUI password for Standby site host3. If Multi-user Access Passwordless is enabled on Standby site, copy the cwallet.sso file from Standby site (/opt/oracle/dcs/conf/dcspublickey_wallet/) to Primary site (/root/). Rename the file to 'cwallet.sso.host3', set the file ownership (root:root) and file permission (0440) and then press enter: Primary database SYS password: { "jobId" : "5c4be2a3-5892-4482-9549-e47005f05548", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "December 19, 2024 01:13:42 AM UYT", "resourceList" : [ ], "description" : "Register Dataguard service for DB 0f56f07e-a1e5-4c88-a535-4cfc7858a80a", "updatedTime" : "December 19, 2024 01:13:42 AM UYT", "jobType" : null, "cpsMetadata" : null } [root@host2 ~]# odacli describe-job -i 5c4be2a3-5892-4482-9549-e47005f05548 Job details ---------------------------------------------------------------- ID: 5c4be2a3-5892-4482-9549-e47005f05548 Description: Register Dataguard service for DB 0f56f07e-a1e5-4c88-a535-4cfc7858a80a Status: Success Created: December 19, 2024 01:13:42 UYT Message: Task Name Start Time End Time Status ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------- Validate register dataguard primary December 19, 2024 01:13:58 UYT December 19, 2024 01:14:15 UYT Success request (Primary site) (Host: host2/Job ID: 6e0cdfbd-69f8-442c-be4a-73937e67b938) Validate register dataguard standby December 19, 2024 01:14:15 UYT December 19, 2024 01:14:35 UYT Success request (Standby site) (Host: host2/Job ID: f505eec8-533d-4a80-9edc-34ec16008167) Validate register dataguard standby December 19, 2024 01:14:35 UYT December 19, 2024 01:15:01 UYT Success request (Standby site) (Host: host2/Job ID: 3d8e79e9-15ab-4d7d-ba92-2f3d0e73852b) Create Data Guard status (Primary December 19, 2024 01:15:01 UYT December 19, 2024 01:15:07 UYT Success site) (Host: host2/Job ID: 87591524-9ec4-42f6-ae3a-1b5eddf4945d) Create Data Guard status (Standby December 19, 2024 01:15:07 UYT December 19, 2024 01:15:15 UYT Success site) (Host: host2/Job ID: 4705752a-24b7-41b5-b2e5-2c64f6eac3c4) Create Data Guard status (Standby December 19, 2024 01:15:15 UYT December 19, 2024 01:15:23 UYT Success site) (Host: host2/Job ID: 0c7553ba-0f53-49f3-9f7f-8128f7d47e30) { "name" : "dgconf_c2", "protectionMode" : "MAX_AVAILABILITY", "replicationGroups" : [ { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "c2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "c2", "sysPassword" : null } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "c2t_2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "c2t_2", "listenerPort" : 1521, "serviceName" : "c2t_2", "sysPassword" : null } ], "transportType" : "SYNC" }, { "sourceEndPoints" : [ { "endpointType" : "PRIMARY", "databaseUniqueName" : "c2", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "c2", "sysPassword" : null } ], "targetEndPoints" : [ { "endpointType" : "STANDBY", "databaseUniqueName" : "c2t_1", "ipAddress" : "xx.xx.xx.xx", "hostName" : "host2", "listenerPort" : 1521, "serviceName" : "c2t_1", "sysPassword" : null } ], "transportType" : "FASTSYNC" }] }
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
BUIを使用したOracle Database ApplianceでのOracle Data Guardの登録
Oracle Database Applianceでは、手動で構成されたOracle Data Guard構成を移行し、BUIを使用して構成メタデータをOracle Database Applianceに登録できます。
Oracle Database Guardの登録の前提条件
- プライマリ・データベースとスタンバイ・データベースを別のOracle Database Applianceハードウェアで実行することをお薦めします。そのため、少なくとも2つの別々のOracle Database Applianceシステムがあることを確認してください。
- プライマリ・システムとスタンバイ・システムのOracle Database Appliance構成を同じにすることをお薦めします。データベース・スイッチ・ロールの予測できない事態を回避するために、データベースのデータベース・バージョンとストレージの構成が同じである必要があります(Oracle ASMまたはOracle ACFSストレージである必要がある)。
- プライマリ・システムとスタンバイ・システムのOracle Database Applianceリリースが同じで、Oracle Database Applianceリリース19.26以降である必要があります。
- オペレーティング・システムをカスタマイズした場合は、システムの環境が同じであることを確認します。
- デプロイメントがOracle Maximum Availability Architecture (MAA)のベスト・プラクティスに従っていることを確認します。Oracle Technology NetworkのOracle Maximum Availability Architecture (MAA)のページを参照してください。
BUIを使用したOracle Data Guardの登録
- ブラウザ・ユーザー・インタフェースにログインします。
https://host-ip-address:7093/mgmt/index.html
- 「Database」をクリックします。
- 「Database」ページで、データベースをクリックしてデータベース詳細を表示します。
- データベースの詳細ページで、「Dataguard Associations」タブをクリックします。データベースに関連付けられているOracle Data Guard構成が表示されます。
- Oracle Data Guard構成を登録するには、「Register」をクリックします。
- 「System Information」タブでは、JSONファイルを使用してOracle Data Guard構成値を指定したり、各フィールドの値を指定できます。
- JSONファイルを使用してOracle Data Guardを登録するには、「System Information」タブで「Browse」をクリックし、構成をロードします。
- または、「Dataguard Configuration Name」および「Select Protection Mode」を指定します。「Database name」フィールドはすでに移入されています。
- Oracle Active Data Guardを有効にする場合は、「Enable Active Dataguard」を選択します。
- 「Primary Information」タブで、「VIP of the Associated Network」、「Listener Port」、「Database SYS Password」および「Backup Encryption Passwords」を指定します。高可用性システムの場合、「Node 0 VIP of the Associated Network」、「Node 1 Primary Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 「Standby Information」タブで、「Standby Host Name」、「VIP of the Associated Network」、「BUI User」、「BUI Password」、「System User」、「Database Unique Name」、「Database SYS Password」、「Listener Port」および「Select Transport Type」を指定します。高可用性システムの場合、「Node 0 Standby Host Name」、「Node 0 VIP of the Associated Network」、「Node 1 Standby Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 複数のスタンバイOracle Data Guard構成を追加できます。「Add Standby」をクリックして、新しいスタンバイOracle Data Guard構成を追加します。追加する新しいスタンバイごとに、新しい「Standby Information」タブが開きます。
- 新しいスタンバイごとに、「Standby Host Name」、「VIP of the Associated Network」、「BUI User」、「BUI Password」、「System User」、「Database Unique Name」、「Database SYS Password」、「Listener Port」および「Select Transport Type」を指定します。高可用性システムの場合、「Node 0 Standby Host Name」、「Node 0 VIP of the Associated Network」、「Node 1 Standby Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 構成をJSONファイルとして保存する場合は、「Save Configuration」をクリックします。
- 「Register」をクリックし、「Yes」をクリックして確定します。ジョブが発行され、正常に完了していることを確認します。
Oracle Database ApplianceでOracle Data Guardを登録するためのJSONの例
[root@node1 ~]# cat dg.json
{
"name" : "provdb1_sprovdb",
"protectionMode" : "MAX_PERFORMANCE",
"replicationGroups" : [ {
"sourceEndPoints" : [ {
"endpointType" : "PRIMARY",
"databaseUniqueName" : "provdb1",
"ipAddress" : "10.32.65.225",
"hostName" : "host1.domain.com",
"listenerPort" : 1521,
"serviceName" : "provdb.domain.com",
"sysPassword" : null
} ],
"targetEndPoints" : [ {
"endpointType" : "STANDBY",
"databaseUniqueName" : "sprovdb",
"ipAddress" : "10.32.65.230",
"hostName" : "host2.domain.com",
"listenerPort" : 1521,
"serviceName" : "sprovdb.domain.com",
"sysPassword" : null
} ],
"transportType" : "ASYNC"
} ]
}
Oracle Database ApplianceでのOracle Data Guardの構成解除
ODACLIコマンドを使用してOracle Data Guardのステータスを構成解除します。
ODACLIコマンドを使用したOracle Data Guardのステータスの構成解除
Oracle Data Guardを構成解除するには、Oracle Data Guard構成IDを指定する必要があります。odacli list-dataguardstatus
コマンドを実行して、Oracle Data Guard構成IDを検索します。
- 1つのスタンバイ・データベースでOracle Data Guardの構成を解除するには、プライマリ・システムで次のコマンドを実行します:
# /opt/oracle/dcs/bin/odacli deconfigure-dataguard --id "ee22f382-b04e-4658-a6c7-ab00fc7e3270" Number of standby databases (enter 1 or 2 | default: 1): Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): oda-admin BUI password for Standby site standby1: Password for root user on Standby site standby1: Standby database will be deleted after Data Guard configuration is removed. Ignore warning and proceed with Data Guard deconfiguration? (Y/N): Y { "jobId" : "0613c649-3da6-463a-8359-2f6d7d17399b", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "January 23, 2025 03:42:41 AM UTC", "resourceList" : [ ], "description" : "DG Deconfig service", "updatedTime" : "January 23, 2025 03:42:41 AM UTC", "jobType" : null, "cpsMetadata" : null } [root@n1 oda]# /opt/oracle/dcs/bin/odacli describe-job -i 0613c649-3da6-463a-8359-2f6d7d17399b Job details ---------------------------------------------------------------- ID: 0613c649-3da6-463a-8359-2f6d7d17399b Description: DG Deconfig service Status: Success Created: January 23, 2025 03:42:41 UTC Message: Task Name Start Time End Time Status ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------- De-configure Dataguard (Primary site) January 23, 2025 03:42:44 UTC January 23, 2025 03:44:22 UTC Success (Host: phxdbfzp22/Job ID: 93758e42-2cf4-4aa1-949e-b6018c1c35d7) Delete Dataguard Status(Primary site) January 23, 2025 03:44:22 UTC January 23, 2025 03:44:28 UTC Success (Host: phxdbfzp22/Job ID: e090af71-9c6d-4d14-8e16-3c64c4aa7f14) Delete Dataguard Status(Standby site) January 23, 2025 03:44:28 UTC January 23, 2025 03:44:36 UTC Success (Host: standby1 /Job ID: a5bf022a-c1ca-4c1a-8747-4ff6a0e938c0) Delete Standby Database (Standby site) January 23, 2025 03:44:36 UTC January 23, 2025 03:46:07 UTC Success (Host: standby1 /Job ID: f93b1f26-69d9-4690-84f9-4c0c9947423a)
- 2つのスタンバイ・データベースでOracle Data Guardの構成を解除するには、プライマリ・システムで次のコマンドを実行します:
# odacli deconfigure-dataguard -i 281ed08c-302f-4a94-932f-02fabf95e88e Number of standby databases (enter 1 or 2 | default: 1): 2 Standby 1 site address: standby1 BUI username for Standby site standby1. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby1, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby1: Password for root user on Standby site standby1: Standby 2 site address: standby2 BUI username for Standby site standby2. If Multi-user Access/Multi-user Access Passwordless is not enabled on Standby site standby2, enter 'oda-admin'; otherwise, enter the name of the user who has irestored the Standby database (default: oda-admin): BUI password for Standby site standby2: Password for root user on Standby site standby2: Standby database will be deleted after Data Guard configuration is removed. Ignore warning and proceed with Data Guard deconfiguration? (Y/N): y { "jobId" : "e0b74b70-da87-4f46-8950-8cf061a8c576", "status" : "Created", "message" : "", "reports" : [ ], "createTimestamp" : "January 17, 2025 21:12:57 PM UTC", "resourceList" : [ ], "description" : "DG Deconfig service", "updatedTime" : "January 17, 2025 21:12:57 PM UTC", "jobType" : null, "cpsMetadata" : null } [root@n1 ~]# odacli describe-job -i "e0b74b70-da87-4f46-8950-8cf061a8c576" Job details ---------------------------------------------------------------- ID: e0b74b70-da87-4f46-8950-8cf061a8c576 Description: DG Deconfig service Status: Success Created: January 17, 2025 21:12:57 UTC Message: Task Name Start Time End Time Status ------------------------------------------------------------------------------------------------------------------------ ---------------- De-configure Dataguard (Primary site) January 17, 2025 21:13:02 UTC January 17, 2025 21:14:14 UTC Success (Host: scaoda8m014/Job ID: 65fbb55a-167d-428b-90ad-72c9e6acd706) Delete Dataguard Status(Primary site) January 17, 2025 21:14:14 UTC January 17, 2025 21:14:20 UTC Success (Host: scaoda8m014/Job ID: 3ade2aa0-6dcf-469a-a592-61e7111d26c2) Delete Dataguard Status(Standby site) January 17, 2025 21:14:20 UTC January 17, 2025 21:14:29 UTC Success (Host: standby1/Job ID: 9948a60f-119f-4a6d-944f-fe02741be5b9) Delete Standby Database (Standby site) January 17, 2025 21:14:29 UTC January 17, 2025 21:16:41 UTC Success (Host: standby1/Job ID: 714e53db-3dd6-4a22-b614-5110a4e98004) Delete Dataguard Status(Standby site) January 17, 2025 21:16:41 UTC January 17, 2025 21:16:49 UTC Success (Host: standby2/Job ID: 17958ff9-c3e3-4ca8-9dc2-975ea2f369cb) Delete Standby Database (Standby site) January 17, 2025 21:16:49 UTC January 17, 2025 21:19:22 UTC Success (Host: standby2/Job ID: c352ea80-6c98-4249-bc7f-2700f1e81fdc)
コマンド・オプションの詳細は、このガイドのOracle Database Applianceコマンドライン・リファレンスの章を参照してください。
BUIを使用したOracle Database ApplianceでのOracle Data Guardの構成解除
BUIを使用してOracle Data Guardのステータスを構成解除します。
BUIを使用したOracle Data Guardステータスの構成解除
- ブラウザ・ユーザー・インタフェースにログインします。
https://host-ip-address:7093/mgmt/index.html
- 「Database」をクリックします。
- 「Database」ページで、データベースをクリックしてデータベース詳細を表示します。
- データベースの詳細ページで、「Dataguard Associations」タブをクリックします。データベースに関連付けられているOracle Data Guard構成が表示されます。
- Oracle Data Guard構成の「Actions」ドロップダウン・リストから「Deconfigure」を選択します。
- 「Standby Information」タブで、「Standby Host Name」、「VIP of the Associated Network」、「BUI User」、「BUI Password」、「System User」および「Database SYS Password」を指定します。高可用性システムの場合、「Node 0 Standby Host Name」、「Node 0 VIP of the Associated Network」、「Node 1 Standby Host Name」および「Node 1 VIP of the Associated Network」を指定します。
- 「Force Run」を選択して、操作を実行します。
- 「Add Standby」をクリックして、構成解除用の別のスタンバイを追加します。
- 構成解除するすべてのスタンバイ・システムの詳細を追加した後、「Deconfigure」をクリックしてアクションを確認します。ジョブが発行され、正常に完了していることを確認します。