Oracle Site Guardは、Enterprise Managerコマンドライン・インタフェース(EM CLI)を使用して、Site Guard構成をコマンドラインから直接管理するか、バッチ・プログラムまたはスクリプトから管理します。
注意: EM CLIコマンドは大文字と小文字を区別するため、正しいEM CLI動詞を使用し、正しい入力を渡しているか確認してください。 |
この章では、Site Guardの構成に使用するすべてのEM CLI動詞を一覧表示します。
関連項目: EM CLIの詳細は、『Oracle Enterprise Managerコマンドライン・インタフェース』を参照してください。 |
ホストをSite Guard構成スクリプトに追加します。複数のホストを追加できます。
書式
emcli add_siteguard_script_hosts -script_id="script_id" -host_name="name1;name2;..."
パラメータ | 説明 |
---|---|
|
スクリプトに関連付けられるID。 |
|
スクリプトに関連付けるホスト。複数のホスト名を指定できます。 |
Oracle Site Guard操作の操作計画を作成します。
書式
emcli create_operation_plan -primary_system_name="name" -standby_system_name="name" -system_name="name" -operation="name" -name="name" -role=""role"
パラメータ | 説明 |
---|---|
|
プライマリ・サイトに関連付けられるシステムの名前。スイッチオーバーまたはフェイルオーバー操作には、このオプションを入力します。 |
|
スタンバイ・サイトに関連付けられるシステムの名前。スイッチオーバーまたはフェイルオーバー操作には、このオプションを入力します。 |
|
システムの名前。起動または停止操作には、このオプションを入力します。 |
|
操作の機能。例: |
|
操作計画の名前。 |
|
操作(起動または停止)を実行する時に、システムに関連付けられるロール。 |
Site Guardのサイト構成を作成します。システムおよびロールを関連付けます。
書式
emcli create_siteguard_configuration -primary_system_name="name" -standby_system_name="name1;name2;..."
パラメータ | 説明 |
---|---|
|
プライマリ・サイトに関連付けられるシステムの名前。 |
|
スタンバイ・システムに関連付けられるシステムの名前。複数のオプションおよび複数のシステム名を指定できます。 |
資格証明をサイト内のターゲットに関連付けます。
書式
emcli create_siteguard_credential_association -system_name="name" [-target_name="name"] -credential_type="type" -credential_name="name" -credential_owner="owner"
[]
は、オプションのパラメータであることを示します。
パラメータ | 説明 |
---|---|
|
システムの名前。 |
|
ターゲットの名前。このパラメータはオプションです。 |
|
資格証明のタイプ。例: |
|
資格証明の名前。 |
|
資格証明の所有者。 |
例C-4 Site Guard資格証明アソシエーションの作成
emcli create_siteguard_credential_association -system_name="BISystem1" -credential_type="HostNormal" -credential_name="HOST-SGCRED" -credential_owner="sysman" emcli create_siteguard_credential_association -system_name="BIsystem1" -target_name="database-instance" -credential_type="HostNormal" -credential_name="HOST-DBCRED" -credential_owner="sysman"
スクリプト(前処理スクリプト、後処理スクリプトおよびストレージ・スクリプト)をSiteGuard構成に関連付けます。
書式
emcli create_siteguard_script -system_name="name" -operation="name" -script_type="type" [-host_name=["name1;name2;..."] -path="path" [-all_hosts=["true or false"] [-role=["role"]
パラメータ | 説明 |
---|---|
|
システムの名前。 |
|
操作の名前。例: |
|
スクリプトのタイプ。 |
|
このスクリプトを実行するホストの名前。 このパラメータはオプションで、2回以上指定できます。 |
|
スクリプトのパス。 |
|
スクリプトを、システム内のすべてのホストで実行できるようにするためのオプション・フラグ。このパラメータは、 |
|
システム・ロールに基づいたスクリプトを構成するためのオプション・フラグ。デフォルトでは、スクリプトは、特定のシステムのプライマリ・ロールおよびスタンバイ・ロールの両方に対して構成されます。例: |
例C-5 Site Guardスクリプトの作成
emcli create_siteguard_script -system_name="BISystem1" -operation="Switchover" -script_type="Pre-Script" -path="/tmp/prescript" -all_hosts="true" -role="Primary" emcli create_siteguard_script -system_name="BISystem1" -operation="Switchover" -script_type="Pre-Script" -path="/tmp/prescript" -host_name="BIHOST1" -host_name="BIHOST2"
Site Guard構成から指定された操作計画を削除します。
書式
emcli delete_operation_plan -name="plan_name"
パラメータ | 説明 |
---|---|
|
削除する操作計画の名前を指定します。 |
Site Guard構成を削除します。指定されたシステムに関連する全体の構成(スクリプト、資格証明アソシエーション、サイト・アソシエーション、操作計画)および関連付けられているすべてのスタンバイ・システムは削除されます。
書式
emcli delete_siteguard_configuration -primary_system_name="name" -standby_system_name="name"
パラメータ | 説明 |
---|---|
|
プライマリ・システムの名前。primary_system_nameまたはstandby_system_nameのいずれかを指定します。 |
|
スタンバイ・システムの名前。 |
Site Guard構成から資格証明アソシエーションを削除します。
書式
emcli delete_siteguard_credential_association -system_name="name" [-target_name=["name"] -credential_type="type"
パラメータ | 説明 |
---|---|
|
サービスが置かれているシステムを指定します。 |
|
資格証明のタイプを指定します。 |
|
ターゲットの名前。このパラメータはオプションです。 |
Site Guard構成から指定されたスクリプトを削除します。
書式
emcli delete_siteguard_script -script_id="script id"
パラメータ | 説明 |
---|---|
|
スクリプトに関連付けられる |
ホストまたは特定のスクリプトと関連付けられたホストを削除します。
書式
emcli delete_siteguard_script_hosts -script_id="script id" -host_name="name1;name2;..."
パラメータ | 説明 |
---|---|
|
スクリプトに関連付けられる |
|
このスクリプトを実行するホストの名前。 このパラメータは、2回以上指定できます。 |
指定された操作計画に関する手順ごとの詳細な情報を提供します。
書式
emcli get_operation_plan_details -name="plan name"
パラメータ | 説明 |
---|---|
|
操作計画の名前。 |
構成されたすべての操作計画を一覧表示します。
書式
emcli get_operation_plans -name="operation plan_name" -operation="operation_name"
パラメータ | 説明 |
---|---|
|
操作計画の名前を指定します。 |
|
操作の名前を指定します。例: |
Site Guard構成を提供します。
書式
emcli get_siteguard_configuration [-primary_system_name={name of the primary system}] [-standby_system_name={name of the standby system}]
パラメータ | 説明 |
---|---|
|
プライマリ・システムの名前。このパラメータはオプションです。 |
|
スタンバイ・システムの名前。このパラメータはオプションです。 |
システムに構成された資格証明アソシエーションを一覧表示します。
書式
emcli get_siteguard_credential_association -system_name="name of the system" [-target_name={name of the target}] [-credential_type={type of the credential}]
パラメータ | 説明 |
---|---|
|
システムの名前。 |
|
ターゲットの名前。このパラメータはオプションです。 |
|
資格証明のタイプ。 このパラメータはオプションです。 |
スクリプトが実行されるように設計されたすべてのスクリプトに関連付けられたホストを一覧表示します。
書式
emcli get_siteguard_script_hosts -script_id="script id"
パラメータ | 説明 |
---|---|
|
スクリプトに関連付けられる |
指定されたシステムに関連付けられたSite Guardスクリプトを取得します。
書式
emcli get_siteguard_scripts -system_name="system_name" -operation="operation_name" [-script_type={type of the script}] [-role={role of the system}]
パラメータ | 説明 |
---|---|
|
システムの名前。 |
|
操作の名前。例: |
|
スクリプトのタイプ。例: |
|
(プライマリ/スタンバイ)。システムに関連付けられたロールに基づいてスクリプトをフィルタ処理するオプションのパラメータ。例: |
特定の操作計画に対する事前チェック操作を送信します。
書式
emcli run_prechecks -operation_plan="name_operation plan"
パラメータ | 説明 |
---|---|
|
操作計画の名前。 |
指定された操作計画を送信して実行します。
書式
emcli submit_operation_plan -name="name_operation plan" [-run_prechecks={true/false}]
パラメータ | 説明 |
---|---|
|
操作計画の名前。 |
|
事前チェックを実行します( |
特定の操作計画の任意の手順で、エラー・モードおよび実行モードを更新します。
書式
emcli update_operation_plan -name="operation plan_name" [-step_number={step number}] [-target_host={host name}] [error_mode={error mode}] [enabled={true/false}]
パラメータ | 説明 |
---|---|
|
操作計画の名前。 |
|
更新する必要のある手順の数。 |
|
システムの名前。このオプションを入力して、操作を開始または停止します。 |
|
操作の機能。例: |
|
Site Guard構成を更新して、スタンバイ・システムを追加します。1つのプライマリ・システムを、1つ以上のスタンバイ・システムに関連付けることができます。
書式
emcli update_siteguard_configuration -primary_system_name="primary system_name" -standby_system_name="standby system_name"
パラメータ | 説明 |
---|---|
|
プライマリ・システムの名前。 |
|
スタンバイ・システムの名前。このパラメータは、2回以上指定できます。 |
例C-20 Site Guard構成の更新
emcli update_siteguard_configuartion -primary_system_name="BISystem1" -standby_system_name="BISystem2"
資格証明アソシエーションを更新します。
書式
emcli update_siteguard_credential_association -system_name="name of the system" [-target_name={name of the target}] -credential_type="type of the credential" -credential_name="name of the credential" -credential_owner="credential owner"
パラメータ | 説明 |
---|---|
|
システムの名前。 |
|
ターゲットの名前。このパラメータはオプションです。 |
|
資格証明のタイプ。 |
|
資格証明の名前。 |
|
資格証明の所有者。 |
例C-21 Site Guard資格証明アソシエーションの更新
emcli create_siteguard_credential_association -system_name="austin-system" -credential_type="HostNormal" -credential_name="HOST-SGCRED" -credential_owner="sysman" emcli create_siteguard_credential_association -system_name="austin-system" -target_name="austin-database-instance" -credential_type="HostNormal" -credential_name="HOST-DBCRED" -credential_owner="sysman"
任意のスクリプトに関連付けられたパスおよびall_hosts
フラグを更新します。
書式
emcli update_siteguard_script -script_id="ID associated with the script" [-path={path of the script}] [-all_hosts={flag to let script run on all the hosts in the system}]
パラメータ | 説明 |
---|---|
|
スクリプトID。 |
|
スクリプトのパス。 |
|
スクリプトを、システム内のすべてのホストで実行できるようにするためのオプション・フラグ。例: |